http
http copied to clipboard
HTTP (The Gem! a.k.a. http.rb) - a fast Ruby HTTP client with a chainable API, streaming support, and timeouts
Hello! The `readpartial` method, which `each` uses allows to overwrite the size of the chunks (defaults to `BUFFER_SIZE`). Would you accept a PR where the `size` can also be passed...
Per the documentation, it should be possible to pass a an `each` block to body to stream: ```ruby require 'http' response = HTTP.get('https://news.ycombinator.com') response.body.each { |chunk| puts(chunk) } ``` This...
For non-textual files any logger running w/ an INFO level causes a lot of noise / gibberish. For example, with logging and an AAC file: ``` 11:55:13 | ??X@??libfaac 1.30?;~,?2Sx??2֡?"dI$D??:L??tY}?q????T?J?9R?~???W?Md?????/?????????~...
- would love to have more granularity into what kind of Connection error is being thrown - this PR changes 3/4 `ConnectionError` throws to use subclasses specific to that failure...
The library raises errors if the server does various unexpected things, e.g. `TooManyRedirectsError`, but it does not raise if the HTTP status code indicates a client error (4xx) or server...
Some servers ignore the `Accept` header. It usually works fine for static files, but not dynamically generated responses. This PR adds a new feature which compares the response `Content-Type` header...