def to_hash
      {
        'status'       => status.to_hash,
        'headers'      => headers,
        'body'         => serializable_body,
        'http_version' => http_version
      }.tap do |hash|
        hash['adapter_metadata'] = adapter_metadata unless adapter_metadata.empty?
      end
    end
def to_hash
      {
        'status'       => status.to_hash,
        'headers'      => headers,
        'body'         => serializable_body,
        'http_version' => http_version
      }.tap do |hash|
        hash['adapter_metadata'] = adapter_metadata unless adapter_metadata.empty?
      end
    end
Builds a serializable hash from the response data.

 @return [Hash] hash that represents this response
  and can be easily serialized.
 @see Response.from_hash