lib/httpx/request.rb in httpx-1.3.0 vs lib/httpx/request.rb in httpx-1.3.1

- old
+ new

@@ -96,33 +96,35 @@ @response = nil @peer_address = nil @persistent = @options.persistent end - # the read timeout defied for this requet. + # the read timeout defined for this requet. def read_timeout @options.timeout[:read_timeout] end - # the write timeout defied for this requet. + # the write timeout defined for this requet. def write_timeout @options.timeout[:write_timeout] end - # the request timeout defied for this requet. + # the request timeout defined for this requet. def request_timeout @options.timeout[:request_timeout] end def persistent? @persistent end + # if the request contains trailer headers def trailers? defined?(@trailers) end + # returns an instance of HTTPX::Headers containing the trailer headers def trailers @trailers ||= @options.headers_class.new end # returns +:r+ or +:w+, depending on whether the request is waiting for a response or flushing. @@ -130,9 +132,10 @@ return :r if @state == :done || @state == :expect :w end + # merges +h+ into the instance of HTTPX::Headers of the request. def merge_headers(h) @headers = @headers.merge(h) end # the URI scheme of the request +uri+.