def headers
      headers = {
          'X-EBAY-API-COMPATIBILITY-LEVEL' => "#{EbayTrader.configuration.ebay_api_version}",
          'X-EBAY-API-SITEID' => "#{ebay_site_id}",
          'X-EBAY-API-CALL-NAME' => call_name,
          'Content-Type' => 'text/xml',
          'Accept-Encoding' => 'gzip'
      }
      xml = xml_request
      headers.merge!({'Content-Length' => "#{xml.length}"}) if xml && !xml.strip.empty?

      # These values are only required for calls that set up and retrieve a user's authentication token
      # (these calls are: GetSessionID, FetchToken, GetTokenStatus, and RevokeToken).
      # In all other calls, these value are ignored..
      if %w"GetSessionID FetchToken GetTokenStatus RevokeToken".include?(call_name)
        headers.merge!({'X-EBAY-API-DEV-NAME'  => EbayTrader.configuration.dev_id})
        headers.merge!({'X-EBAY-API-APP-NAME'  => EbayTrader.configuration.app_id})
        headers.merge!({'X-EBAY-API-CERT-NAME' => EbayTrader.configuration.cert_id})
      end
      headers
    end
def headers
      headers = {
          'X-EBAY-API-COMPATIBILITY-LEVEL' => "#{EbayTrader.configuration.ebay_api_version}",
          'X-EBAY-API-SITEID' => "#{ebay_site_id}",
          'X-EBAY-API-CALL-NAME' => call_name,
          'Content-Type' => 'text/xml',
          'Accept-Encoding' => 'gzip'
      }
      xml = xml_request
      headers.merge!({'Content-Length' => "#{xml.length}"}) if xml && !xml.strip.empty?

      # These values are only required for calls that set up and retrieve a user's authentication token
      # (these calls are: GetSessionID, FetchToken, GetTokenStatus, and RevokeToken).
      # In all other calls, these value are ignored..
      if %w"GetSessionID FetchToken GetTokenStatus RevokeToken".include?(call_name)
        headers.merge!({'X-EBAY-API-DEV-NAME'  => EbayTrader.configuration.dev_id})
        headers.merge!({'X-EBAY-API-APP-NAME'  => EbayTrader.configuration.app_id})
        headers.merge!({'X-EBAY-API-CERT-NAME' => EbayTrader.configuration.cert_id})
      end
      headers
    end
Get a hash of the default headers to be submitted to eBay API via httparty.
 Additional headers can be merged into this hash as follows:
 ebay_headers.merge({'X-EBAY-API-CALL-NAME' => 'CallName'})
 http://developer.ebay.com/Devzone/XML/docs/WebHelp/InvokingWebServices-Routing_the_Request_(Gateway_URLs).html