class WebMock::HttpLibAdapters::TyphoeusAdapter

def self.build_request_signature(req)

def self.build_request_signature(req)
  uri = WebMock::Util::URI.heuristic_parse(req.url)
  uri.path = uri.normalized_path.gsub("[^:]//","/")
  headers = req.options[:headers]
  if req.options[:userpwd]
    headers['Authorization'] = WebMock::Util::Headers.basic_auth_header(req.options[:userpwd])
  end
  body = req.options[:body]
  if body.is_a?(Hash)
    body = WebMock::Util::QueryMapper.values_to_query(body)
  end
  request_signature = WebMock::RequestSignature.new(
    req.options[:method] || :get,
    uri.to_s,
    body: body,
    headers: headers
  )
  req.instance_variable_set(:@__webmock_request_signature, request_signature)
  request_signature
end