mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
fixed inspects and logger
This commit is contained in:
parent
50adc95c46
commit
ba4f6d9b01
@ -144,7 +144,7 @@ module HTTPX
|
||||
buffer.clear
|
||||
request.headers.each do |field, value|
|
||||
buffer << "#{capitalized(field)}: #{value}" << CRLF
|
||||
log { "<- HEADER: #{buffer.chomp.inspect}" }
|
||||
log { "<- HEADER: #{buffer.chomp}" }
|
||||
@buffer << buffer
|
||||
buffer.clear
|
||||
end
|
||||
|
@ -90,6 +90,10 @@ module HTTPX
|
||||
nil
|
||||
end
|
||||
|
||||
def inspect
|
||||
"#<Request #{@verb.to_s.upcase} #{path} @headers=#{@headers.to_hash} @body=#{@body}>"
|
||||
end
|
||||
|
||||
class Body
|
||||
class << self
|
||||
def new(*, options)
|
||||
|
@ -47,6 +47,10 @@ module HTTPX
|
||||
ContentType.parse(@headers["content-type"])
|
||||
end
|
||||
|
||||
def inspect
|
||||
"#<Response @status=#{@status} @headers=#{@headers} @body=#{@body}>"
|
||||
end
|
||||
|
||||
class Body
|
||||
def initialize(response, threshold_size: , window_size: 1 << 14)
|
||||
@response = response
|
||||
|
Loading…
x
Reference in New Issue
Block a user