/// <summary>
 /// Adds the appropriate authentication headers to the given http client.
 /// </summary>
 /// <param name="authenticationId">The access token id for the header.</param>
 /// <param name="client">The http client.</param>
 internal void AddAuthenticationHeader(string authenticationId, IHttpAbstractionClient client)
 {
     client.Headers.Add("X-Auth-Token", authenticationId);
 }
 /// <summary>
 /// Adds the appropriate headers to the Http client for the given objects metadata.
 /// </summary>
 /// <param name="metadata">The items metadata.</param>
 /// <param name="client">The http client.</param>
 internal void AddObjectMetadata(IDictionary<string, string> metadata, IHttpAbstractionClient client)
 {
     AddItemMetadata("X-Object-Meta", metadata, client); 
 }
 /// <summary>
 /// Adds the appropriate headers to the Http client for the given containers metadata.
 /// </summary>
 /// <param name="metadata">The items metadata.</param>
 /// <param name="client">The http client.</param>
 internal void AddContainerMetadata(IDictionary<string, string> metadata, IHttpAbstractionClient client)
 {
     AddItemMetadata("X-Container-Meta", metadata, client); 
 }
 /// <summary>
 /// Adds the appropriate headers to the Http client for the given items metadata.
 /// </summary>
 /// <param name="headerPrefix">The prefix for the header.</param>
 /// <param name="metadata">The items metadata.</param>
 /// <param name="client">The http client.</param>
 internal void AddItemMetadata(string headerPrefix, IDictionary<string, string> metadata, IHttpAbstractionClient client)
 {
     foreach (var header in metadata)
     {
         client.Headers.Add(string.Format("{0}-{1}", headerPrefix, header.Key), header.Value);
     }
 }
 /// <summary>
 /// Adds the appropriate authentication headers to the given http client.
 /// </summary>
 /// <param name="authenticationId">The access token id for the header.</param>
 /// <param name="client">The http client.</param>
 internal void AddAuthenticationHeader(string authenticationId, IHttpAbstractionClient client)
 {
     client.Headers.Add("X-Auth-Token", authenticationId);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Adds the appropriate headers to the Http client for the given containers metadata.
 /// </summary>
 /// <param name="metadata">The items metadata.</param>
 /// <param name="client">The http client.</param>
 internal void AddContainerMetadata(IDictionary <string, string> metadata, IHttpAbstractionClient client)
 {
     AddItemMetadata("X-Container-Meta", metadata, client);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Adds the appropriate headers to the Http client for the given objects metadata.
 /// </summary>
 /// <param name="metadata">The items metadata.</param>
 /// <param name="client">The http client.</param>
 internal void AddObjectMetadata(IDictionary <string, string> metadata, IHttpAbstractionClient client)
 {
     AddItemMetadata("X-Object-Meta", metadata, client);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Adds the appropriate headers to the Http client for the given items metadata.
 /// </summary>
 /// <param name="headerPrefix">The prefix for the header.</param>
 /// <param name="metadata">The items metadata.</param>
 /// <param name="client">The http client.</param>
 internal void AddItemMetadata(string headerPrefix, IDictionary <string, string> metadata, IHttpAbstractionClient client)
 {
     foreach (var header in metadata)
     {
         client.Headers.Add(string.Format("{0}-{1}", headerPrefix, header.Key), header.Value);
     }
 }