I am trying to use Microsoft face API software in c#
. The first step says I need to authorize the API read below for instructions:
Every call to the Face API requires a subscription key. This key needs to be either passed through a query string parameter, or specified in the request header. To pass the subscription key through query string, please refer to the request URL for the Face - Detect as an example:
https://api.projectoxford.ai/face/v1.0/detect[?returnFaceId][&returnFaceLandmarks][&returnFaceAttributes]&subscription-key=<Your subscription key>
As an alternative, the subscription key can also be specified in the HTTP request header: ocp-apim-subscription-key: <Your subscription key>
When using a client library, the subscription key is passed in through the constructor of the FaceServiceClient
class. For example:
faceServiceClient = new FaceServiceClient("Your subscription key");
The subscription key can be obtained from the Marketplace page of your Azure management portal. See Subscriptions.
Now I am confused at how I would go about this. So first I tried using the query string way of doing it .
sing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using Microsoft.ProjectOxford.Face;
using Microsoft.ProjectOxford;
using System.Web;
using System.Web.UI;
namespace faceAPI
{
class Program
{
string fullname1 = Request.QueryString["https://api.projectoxford.ai/face/v1.0/detect[?returnFaceId][&returnFaceLandmarks][&returnFaceAttributes]&subscription-key=<3ac0d7ef76274d59837a6c4ce60ce309>"];
string fullname2 = Request["https://api.projectoxford.ai/face/v1.0/detect[?returnFaceId][&returnFaceLandmarks][&returnFaceAttributes]&subscription-key=<3ac0d7ef76274d59837a6c4ce60ce309>"];
static void Main(string[] args)
{
}
}
}
But after i do this i get an error saying :
Error 3 The name 'Request' does not exist in the current context