c# - How do I do set the Authorization header of a GoogleLogin request using the new WCF REST HttpClient API -
I use the new HTTP client class, part of the WCF REST starter kit, to certify Google's map data service I am doing I've got my client login authentication token, but I'm not sure how to get this instruction:
get
authorization: GoogleLogin auth = "authorization_token" / P>
and work it in this code:
var auth = [myAuthToken] var http = new http client ("http://maps.google. Com / maps / feed / map / [myUserName] / full "); Http.DefaultHeaders.Authorization = Microsoft.Http.Headers.Credential.CreateBasic ("GoogleLogin", "auth =" + auth); Var response = http.Get ();
: "Authorization of GET request is required to pass HTTP header, an AuthSub or GoogleLogin token." I have a token, I do not know how to properly make the HTTP header of that authorization through the API. Does anybody help?
Instead of using the CreateBasic static method, you can pass only the full authorization header to the credential class Manufacturers of eg
client.DefaultHeaders.Authorization = New Credentials ("GoogleLogin auth =" + auth);
Comments
Post a Comment