lib/azure/armrest/model/storage_account.rb
# Set the headers needed, including the Authorization header.
#
Set the headers needed, including the Authorization header.
Set the headers needed including the Authorization header .
def build_headers(url, key, sig_type = nil, additional_headers = {})
        sig = Signature.new(url, key)
        sig_type ||= 'blob'
        content_type = additional_headers['content-type'] || ''
        headers = {
          'content-type' => content_type,
          'x-ms-date'    => Time.now.httpdate,
          'x-ms-version' => storage_api_version,
          'auth_string'  => true
        }
        headers.merge!(additional_headers)
        headers['authorization'] = sig.signature(sig_type, headers)
        headers
      end
def build_headers ( url , key , sig_type = nil , additional_headers = { } ) sig = Signature . new ( url , key ) sig_type ||= 'blob' content_type = additional_headers [ 'content-type' ] || '' headers = { 'content-type' => content_type , 'x-ms-date' => Time . now . httpdate , 'x-ms-version' => storage_api_version , 'auth_string' => true } headers . merge! ( additional_headers ) headers [ 'authorization' ] = sig . signature ( sig_type , headers ) headers end
Set the headers needed, including the Authorization header.
Set the headers needed including the Authorization header .
# RestClient will set the Content-Type to application/x-www-form-urlencoded. # We must override this setting or the request will fail in some cases.
url
<not_specific>
key
<not_specific>
sig_type
<not_specific>
additional_headers
<not_specific>