diff --git a/lib/wreq_ruby/response.rb b/lib/wreq_ruby/response.rb index d1194a1..e019226 100644 --- a/lib/wreq_ruby/response.rb +++ b/lib/wreq_ruby/response.rb @@ -64,6 +64,17 @@ def url def content_length end + # Get the response headers. + # + # Header names are case-insensitive. Use {Wreq::Headers#get_all} to get + # every value when a header appears more than once. + # + # @return [Wreq::Headers] Response headers + # @example + # response.headers.get("content-type") # => "application/json" + def headers + end + # Get the local socket address. # # @return [String, nil] Local address (e.g., "127.0.0.1:54321"), or nil