class FaradayMiddleware::Chunked
Public: Parse a Transfer-Encoding: Chunked
response to just the original data
Constants
- TRANSFER_ENCODING
Public Instance Methods
chunked_encoding?(headers)
click to toggle source
# File lib/faraday_middleware/response/chunked.rb, line 25 def chunked_encoding?(headers) encoding = headers[TRANSFER_ENCODING] and encoding.split(',').include?('chunked') end
parse_response?(env)
click to toggle source
Calls superclass method
FaradayMiddleware::ResponseMiddleware#parse_response?
# File lib/faraday_middleware/response/chunked.rb, line 21 def parse_response?(env) super and chunked_encoding?(env[:response_headers]) end