Alexey Zapparov
Alexey Zapparov
In general yes. Please open a PR so we will be able to start discussion on how to better implement this :D I think we should improve `use(:auto_inflate)` api to...
The idea of using readpartial is to avoid sucking whole body into memory. :D
Totally agree about kwargs!
``` ruby client = HTTP.headers(my_headers) ssl_contexts.each do |ctx| res = client.get(url, :ssl_context => ctx) # ... end ```
Oh. That's a good question... @tarcieri @zanker IMO it's a pretty good point. Probably we can provide API like: ``` ruby client.ssl(ssl_context).get(url) ```
@tarcieri why not allow `#ssl` understand `:context` as part of params? :D
For simplicity of those who need to fetch default user agent, we should expose it as a constant IMO: ``` ruby class HTTP::Client DEFAULT_USER_AGENT = "http.rb/#{HTTP::VERSION}" end
`mattr_accessor` is a Rails method. And I don't think it's correct to override user agent of default client.
Also, I feel myself a bit stupid, but default user agent is long-time available as `HTTP::Request::USER_AGENT`
Probably worth to move it to `HTTP::Client` though to make it more obvious. Or not (it belongs to Request I guess).