mirror of
https://github.com/lostisland/faraday.git
synced 2025-12-05 00:02:56 -05:00
25 lines
565 B
Markdown
25 lines
565 B
Markdown
# Net::HTTP Adapter
|
|
|
|
This Adapter uses the Net::HTTP client from the ruby standard library to make
|
|
HTTP requests.
|
|
|
|
```ruby
|
|
conn = Faraday.new(...) do |f|
|
|
f.adapter :net_http do |http|
|
|
# yields Net::HTTP
|
|
http.idle_timeout = 100
|
|
http.verify_callback = lambda do |preverify, cert_store|
|
|
# do something here...
|
|
end
|
|
end
|
|
end
|
|
```
|
|
|
|
## Links
|
|
|
|
* [Net::HTTP RDoc][rdoc]
|
|
* [Adapter RDoc][adapter_rdoc]
|
|
|
|
[rdoc]: http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/Net/HTTP.html
|
|
[adapter_rdoc]: https://www.rubydoc.info/gems/faraday/Faraday/Adapter/NetHttp
|