mirror of
https://github.com/lostisland/faraday.git
synced 2025-12-06 00:01:23 -05:00
extract net-http-persistent docs
This commit is contained in:
parent
bd684191dd
commit
17b576ef12
12
README.md
12
README.md
@ -302,16 +302,6 @@ conn = Faraday.new(...) do |f|
|
|||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
### NetHttpPersistent
|
|
||||||
```ruby
|
|
||||||
conn = Faraday.new(...) do |f|
|
|
||||||
f.adapter :net_http_persistent, pool_size: 5 do |http| # yields Net::HTTP::Persistent
|
|
||||||
http.idle_timeout = 100
|
|
||||||
http.retry_change_requests = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
```
|
|
||||||
|
|
||||||
### Patron
|
### Patron
|
||||||
```ruby
|
```ruby
|
||||||
conn = Faraday.new(...) do |f|
|
conn = Faraday.new(...) do |f|
|
||||||
@ -398,7 +388,7 @@ Copyright (c) 2009-2017 [Rick Olson](mailto:technoweenie@gmail.com), Zack Hobson
|
|||||||
See [LICENSE][] for details.
|
See [LICENSE][] for details.
|
||||||
|
|
||||||
[net_http]: http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/Net/HTTP.html
|
[net_http]: http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/Net/HTTP.html
|
||||||
[persistent]: https://github.com/drbrain/net-http-persistent
|
[persistent]: ./docs/adapters/net_http_persistent.md
|
||||||
[travis]: https://travis-ci.org/lostisland/faraday
|
[travis]: https://travis-ci.org/lostisland/faraday
|
||||||
[excon]: https://github.com/excon/excon#readme
|
[excon]: https://github.com/excon/excon#readme
|
||||||
[patron]: http://toland.github.io/patron/
|
[patron]: http://toland.github.io/patron/
|
||||||
|
|||||||
23
docs/adapters/net_http_persistent.md
Normal file
23
docs/adapters/net_http_persistent.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Net::HTTP::Persistent
|
||||||
|
|
||||||
|
This Adapter uses the [net-http-persistent][gem] gem to make HTTP requests.
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
conn = Faraday.new(...) do |f|
|
||||||
|
f.adapter :net_http_persistent, pool_size: 5 do |http|
|
||||||
|
# yields Net::HTTP::Persistent
|
||||||
|
http.idle_timeout = 100
|
||||||
|
http.retry_change_requests = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
* [Gem][gem]
|
||||||
|
* [Gem source code][src]
|
||||||
|
* [Adapter rdoc][rdoc]
|
||||||
|
|
||||||
|
[gem]: https://rubygems.org/gems/net-http-persistent/versions/2.9.4
|
||||||
|
[src]: https://github.com/drbrain/net-http-persistent
|
||||||
|
[rdoc]: https://www.rubydoc.info/gems/faraday/Faraday/Adapter/NetHttpPersistent
|
||||||
Loading…
x
Reference in New Issue
Block a user