private NameValueCollection OAuthQuery(OAuthRequest oAuthRequest) { var auth = oAuthRequest.GetAuthorizationHeader(); var request = new Common.Http.HttpRequest(oAuthRequest.RequestUrl); request.Headers.Add("Authorization", auth); var response = _httpClient.Get(request); return(HttpUtility.ParseQueryString(response.Content)); }
private string GetAuthorizationHeader(OAuthRequest oAuthRequest) { var request = new Common.Http.HttpRequest(Settings.SigningUrl) { Method = HttpMethod.Post, }; request.Headers.Set("Content-Type", "application/json"); var payload = oAuthRequest.ToJson(); _logger.Trace(payload); request.SetContent(payload); var response = _httpClient.Post <AuthorizationHeader>(request).Resource; return(response.Authorization); }
private NameValueCollection OAuthQuery(OAuthRequest oAuthRequest) { var auth = oAuthRequest.GetAuthorizationHeader(); var request = new Common.Http.HttpRequest(oAuthRequest.RequestUrl); request.Headers.Add("Authorization", auth); var response = _httpClient.Get(request); return HttpUtility.ParseQueryString(response.Content); }