javascript - Setting header in Web.HttpClient to contain quotations -


i'm trying make post request using web.httpclient (javascript)

var uri = new windows.foundation.uri(baseurl); var hc = new web.httpclient(); var authheader = "oauth authsig=\"dsadsasd\", timestamp=\"123132\""; var request = new web.httprequestmessage(web.httpmethod.post, uri);  request.headers.insert("authorization", authheader);  hc.sendrequestasync(request); 

however setting authorization header to:

authsig=dsadsasd, timestamp=123132 

instead of:

authsig="dsadsasd", timestamp="123132" 

any thoughts why? or how can around this?

if set authorization way:

var webhttp = windows.web.http; // fit in stackoverflow :) var authhdr = new webhttp.headers.httpcredentialsheadervalue("oauth",                     authheader);  request.headers.authorization = authhdr; 

the quotes not stripped value.

depending on you're trying do, may want take @ webauthenticationbroker sample.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -