Exemplo n.º 1
0
 public Task<HttpResponseMessage> Post(StorageUri uri, string message)
 {
     var verb = "POST";
     var httpClient = _GetHttpClient(uri, verb, message, _textPlainContentType);
     var stringContent = new StringContent(message, Encoding.UTF8);
     return httpClient.PostAsync(uri.ToUriString(), stringContent);
 }
 public string Build(string verb, string content, StorageUri uri, AzureStorageAccountInfo accountInfo, HttpRequestHeaders headers, string contentType)
 {
     var ifMatch = "";
     var md5 = "";
     var canonicalizedHeaderString = _GetCanonicalizedHeaders(headers);
     var canonResource = _GetCanonicalizedResource(new Uri(uri.ToUriString()), accountInfo.Account);
     var authorizationHeader = _GetAuthorizationHeader(verb, content, ifMatch, canonicalizedHeaderString, canonResource, md5, accountInfo, contentType);
     return authorizationHeader;
 }
Exemplo n.º 3
0
 public Task<HttpResponseMessage> Put(StorageUri uri, IEnumerable<NameValueHeaderValue> additionalHeaders)
 {
     var verb = "PUT";
     var httpClient = _GetHttpClient(uri, verb, "", "", additionalHeaders);
     return httpClient.PutAsync(uri.ToUriString(), null);
 }
Exemplo n.º 4
0
 public Task<HttpResponseMessage> Put(StorageUri uri)
 {
     var verb = "PUT";
     var httpClient = _GetHttpClient(uri, verb, "", "");
     return httpClient.PutAsync(uri.ToUriString(), null);
 }
Exemplo n.º 5
0
 public Task<HttpResponseMessage> Get(StorageUri uri)
 {
     var verb = "GET";
     var httpClient = _GetHttpClient(uri, verb, "", "");
     return httpClient.GetAsync(uri.ToUriString());
 }
Exemplo n.º 6
0
 public Task<HttpResponseMessage> Delete(StorageUri uri)
 {
     var verb = "DELETE";
     var httpClient = _GetHttpClient(uri, verb, "", "");
     return httpClient.DeleteAsync(uri.ToUriString());
 }