net-http
net-http copied to clipboard
Net::HTTP provides a rich library which can be used to build HTTP user-agents.
Generic request will supply a default content-type of `application/x-www-form-urlencoded` - https://github.com/ruby/net-http/blob/a0fab1ab52c52d37d21241a86eba6d958ff1c4db/lib/net/http/generic_request.rb#L299 While this is helpful, this can have negative consequences, and we cannot disable the behavior. In cases where there...
Trailers in chunked transfer are described by [rfc3230-section 4.1](https://datatracker.ietf.org/doc/html/rfc7230#section-4.1). Net/http does not support setting trailers nor is there a way for users to implement chunked trailers on top of net/http....
Can you add security_level option for ssl?
We need to pass a `URI` object to `Net::HTTP.get_response` (or `Net::HTTP.get`). ```ruby Net::HTTP.get_response(URI('http://www.example.com/index.html')) ``` With this patch, these methods can receive a URI-string. ```ruby Net::HTTP.get_response('http://www.example.com/index.html') ```
Closes #176. It should be used by something like this: ```ruby Net::HTTP.default_configuration = { read_timeout: 1, write_timeout: 1 } http = Net::HTTP.new(hostname) http.open_timeout # => 60 http.read_timeout # => 1...
Depending on how you start a connection, the `Connection` header may be unexpectedly set to `close` Creating a new instance of `Net::HTTP` and then calling its `request` method (or any...
I'm curious about net-http's hooks, eg. `do_start`, `on_connect`, and `do_finish`. They're marked as private and seem largely unused (and untested). Do we still need/want them? If we do want them,...
I'm getting: ``` Exception: NoMethodError: undefined method `include?' for nil ``` Here: ``` vendor/bundle/ruby/3.3.0/gems/net-http-0.4.1/lib/net/http.rb:2466:in `addr_port' vendor/bundle/ruby/3.3.0/gems/net-http-0.4.1/lib/net/http.rb:2401:in `begin_transport' vendor/bundle/ruby/3.3.0/gems/net-http-0.4.1/lib/net/http.rb:2332:in `transport_request' vendor/bundle/ruby/3.3.0/gems/net-http-0.4.1/lib/net/http.rb:2306:in `request' vendor/bundle/ruby/3.3.0/gems/airbrake-13.0.4/lib/airbrake/rails/net_http.rb:11:in `block in request' vendor/bundle/ruby/3.3.0/gems/airbrake-13.0.4/lib/airbrake/rack.rb:21:in `capture_timing' vendor/bundle/ruby/3.3.0/gems/airbrake-13.0.4/lib/airbrake/rails/net_http.rb:10:in `request' vendor/bundle/ruby/3.3.0/gems/faraday-net_http-3.3.0/lib/faraday/adapter/net_http.rb:112:in...
What is the proper way to refine the initializer of this class? The below does not seem work. ```ruby require 'net/http' module Foo refine Gem::Net::HTTPGenericRequest.singleton_class do def new(*) obj =...