http icon indicating copy to clipboard operation
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

Results 113 http issues
Sort by recently updated
recently updated
newest added

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...

Feature
Improvement

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...

Bug

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?9’R?~???W?Md?????/?????????~...

Improvement

- 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...

socks 5 support, example: ``` # SOCKS5 proxy details proxy_host = "98.170.57.241" proxy_port = 4145 begin # Make the request through SOCKS5 proxy response = HTTP .via_socks5(proxy_host, proxy_port) .get("http://ifconfig.me/ip") puts...

It would be nice to be able to connect to HTTP servers via UNIX socket (e.g. docker.sock). It's mostly interesting for healthcheckers and similar utility type usage. API can be...

## Why Hello. :wave: I discovered a rather hard to debug situation when using HTTP's global configuration to configure logging and then ending up with a JSON parsing error due...