public HttpResponseMessage(HttpHeaders headers, HttpStatusCode statusCode, string statusDescription)
 {
     ArgumentUtils.AssertNotNull(headers, "headers");
     this.headers = headers;
     this.statusCode = statusCode;
     this.statusDescription = statusDescription;
 }
Exemple #2
0
 public HttpEntity(HttpHeaders headers) : this(null, headers)
 {
 }
Exemple #3
0
 public HttpEntity(object body, HttpHeaders headers)
 {
     ArgumentUtils.AssertNotNull(headers, "headers");
     this.body = body;
     this.headers = headers;
 }
 private HttpEntity CreateExchangeForTokenRequest(Uri tokenUrl, IDictionary<string, string> tokenParameters, NameValueCollection additionalParameters, string tokenSecret)
 {
     HttpHeaders headers = new HttpHeaders();
     headers.Add("Authorization", this.signingSupport.BuildAuthorizationHeaderValue(tokenUrl, tokenParameters, additionalParameters, this.consumerKey, this.consumerSecret, tokenSecret));
     if (additionalParameters == null)
     {
         additionalParameters = new NameValueCollection();
     }
     return new HttpEntity(additionalParameters, headers);
 }