Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
opt
/
ruby-2.7
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Bundler
/
Persistent
/
Net
/
HTTP
/
Persistent
/
//opt/ruby-2.7/usr/share/ri/2.7.0/system/Bundler/Persistent/Net/HTTP/Persistent/cdesc-Persistent.ri
U:RDoc::NormalClass[iI"Persistent:ETI"/Bundler::Persistent::Net::HTTP::Persistent;TI"Object;To:RDoc::Markup::Document:@parts[o;;[So:RDoc::Markup::Paragraph;[I")Persistent connections for Net::HTTP;To:RDoc::Markup::BlankLine o; ;[I"`Bundler::Persistent::Net::HTTP::Persistent maintains persistent connections across all the ;TI"Mservers you wish to talk to. For each host:port you communicate with a ;TI"-single persistent connection is created.;T@o; ;[I"\Multiple Bundler::Persistent::Net::HTTP::Persistent objects will share the same set of ;TI"connections.;T@o; ;[I"DFor each thread you start a new connection will be created. A ;TI"]Bundler::Persistent::Net::HTTP::Persistent connection will not be shared across threads.;T@o; ;[I"QYou can shut down the HTTP connections when done by calling #shutdown. You ;TI"cshould name your Bundler::Persistent::Net::HTTP::Persistent object if you intend to call this ;TI"method.;T@o; ;[I" Example:;T@o:RDoc::Markup::Verbatim;[I"Jrequire 'bundler/vendor/net-http-persistent/lib/net/http/persistent' ;TI" ;TI"Auri = Bundler::URI 'http://example.com/awesome/web/service' ;TI" ;TI"Ohttp = Bundler::Persistent::Net::HTTP::Persistent.new name: 'my_app_name' ;TI" ;TI"# perform a GET ;TI"!response = http.request uri ;TI" ;TI" # or ;TI" ;TI".get = Net::HTTP::Get.new uri.request_uri ;TI"!response = http.request get ;TI" ;TI"# create a POST ;TI"post_uri = uri + 'create' ;TI".post = Net::HTTP::Post.new post_uri.path ;TI".post.set_form_data 'some' => 'cool data' ;TI" ;TI"=# perform the POST, the Bundler::URI is always required ;TI"*response http.request post_uri, post ;T:@format0o; ;[I"QNote that for GET, HEAD and other requests that do not have a body you want ;TI"`to use Bundler::URI#request_uri not Bundler::URI#path. The request_uri contains the query ;TI":params which are sent in the body for other requests.;T@S:RDoc::Markup::Heading: leveli: textI"SSL;T@o; ;[ I"PSSL connections are automatically created depending upon the scheme of the ;TI"SBundler::URI. SSL connections are automatically verified against the default ;TI"Mcertificate store for your computer. You can override this by changing ;TI":verify_mode or by specifying an alternate cert_store.;T@o; ;[I"MHere are the SSL settings, see the individual methods for documentation:;T@o:RDoc::Markup::List: @type: NOTE:@items[o:RDoc::Markup::ListItem:@label[I"#certificate ;T;[o; ;[I"This client's certificate;To;;[I"#ca_file ;T;[o; ;[I" The certificate-authorities;To;;[I"#ca_path ;T;[o; ;[I"+Directory with certificate-authorities;To;;[I"#cert_store ;T;[o; ;[I"An SSL certificate store;To;;[I"#ciphers ;T;[o; ;[I" List of SSl ciphers allowed;To;;[I"#private_key ;T;[o; ;[I"!The client's SSL private key;To;;[I"#reuse_ssl_sessions ;T;[o; ;[I"5Reuse a previously opened SSL session for a new ;TI"connection;To;;[I"#ssl_timeout ;T;[o; ;[I"SSL session lifetime;To;;[I"#ssl_version ;T;[o; ;[I"&Which specific SSL version to use;To;;[I"#verify_callback ;T;[o; ;[I"(For server certificate verification;To;;[I"#verify_depth ;T;[o; ;[I"&Depth of certificate verification;To;;[I"#verify_mode ;T;[o; ;[I"'How connections should be verified;T@S; ;i;I"Proxies;T@o; ;[I"QA proxy can be set through #proxy= or at initialization time by providing a ;TI"Ysecond argument to ::new. The proxy may be the Bundler::URI of the proxy server or ;TI"@<code>:ENV</code> which will consult environment variables.;T@o; ;[I"1See #proxy= and #proxy_from_env for details.;T@S; ;i;I"Headers;T@o; ;[I"RHeaders may be specified for use in every request. #headers are appended to ;TI"Pany headers on the request. #override_headers replace existing headers on ;TI"the request.;T@o; ;[ I"RThe difference between the two can be seen in setting the User-Agent. Using ;TI"N<code>http.headers['User-Agent'] = 'MyUserAgent'</code> will send "Ruby, ;TI"DMyUserAgent" while <code>http.override_headers['User-Agent'] = ;TI"2'MyUserAgent'</code> will send "MyUserAgent".;T@S; ;i;I"Tuning;T@S; ;i;I"Segregation;T@o; ;[I"QBy providing an application name to ::new you can separate your connections ;TI"0from the connections of other applications.;T@S; ;i;I"Idle Timeout;T@o; ;[I"ZIf a connection hasn't been used for this number of seconds it will automatically be ;TI"Qreset upon the next use to avoid attempting to send to a closed connection. ;TI"UThe default value is 5 seconds. nil means no timeout. Set through #idle_timeout.;T@o; ;[I"OReducing this value may help avoid the "too many connection resets" error ;TI"Qwhen sending non-idempotent requests while increasing this value will cause ;TI"fewer round-trips.;T@S; ;i;I"Read Timeout;T@o; ;[I"QThe amount of time allowed between reading two chunks from the socket. Set ;TI"through #read_timeout;T@S; ;i;I"Max Requests;T@o; ;[ I"QThe number of requests that should be made before opening a new connection. ;TI"PTypically many keep-alive capable servers tune this to 100 or less, so the ;TI"T101st request will fail with ECONNRESET. If unset (default), this value has no ;TI"Qeffect, if set, connections will be reset on the request after max_requests.;T@S; ;i;I"Open Timeout;T@o; ;[I"LThe amount of time to wait for a connection to be opened. Set through ;TI"#open_timeout.;T@S; ;i;I"Socket Options;T@o; ;[I"RSocket options may be set on newly-created connections. See #socket_options ;TI"for details.;T@S; ;i;I"Non-Idempotent Requests;T@o; ;[I"NBy default non-idempotent requests will not be retried per RFC 2616. By ;TI"Rsetting retry_change_requests to true requests will automatically be retried ;TI" once.;T@o; ;[I"MOnly do this when you know that retrying a POST or other non-idempotent ;TI"Hrequest is safe for your application and will not create duplicate ;TI"resources.;T@o; ;[I"LThe recommended way to handle non-idempotent requests is the following:;T@o;;[I"Jrequire 'bundler/vendor/net-http-persistent/lib/net/http/persistent' ;TI" ;TI"Auri = Bundler::URI 'http://example.com/awesome/web/service' ;TI"post_uri = uri + 'create' ;TI" ;TI"Ohttp = Bundler::Persistent::Net::HTTP::Persistent.new name: 'my_app_name' ;TI" ;TI".post = Net::HTTP::Post.new post_uri.path ;TI" # ... fill in POST request ;TI" ;TI"begin ;TI". response = http.request post_uri, post ;TI">rescue Bundler::Persistent::Net::HTTP::Persistent::Error ;TI" ;TI"N # POST failed, make a new request to verify the server did not process ;TI" # the request ;TI" exists_uri = uri + '...' ;TI"& response = http.get exists_uri ;TI" ;TI" # Retry if it failed ;TI"' retry if response.code == '404' ;TI" end ;T;0o; ;[I"OThe method of determining if the resource was created or not is unique to ;TI"Lthe particular service you are using. Of course, you will want to add ;TI"&protection from infinite looping.;T@S; ;i;I"Connection Termination;T@o; ;[ I"eIf you are done using the Bundler::Persistent::Net::HTTP::Persistent instance you may shut down ;TI"Lall the connections in the current thread with #shutdown. This is not ;TI"Precommended for normal use, it should only be used when it will be several ;TI"2minutes before you make another HTTP request.;T@o; ;[ I"OIf you are using multiple threads, call #shutdown in each thread when the ;TI"Mthread is done making requests. If you don't call shutdown, that's OK. ;TI"PRuby will automatically garbage collect and shutdown your HTTP connections ;TI" when the thread terminates.;T: @fileI"Flib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[$[ I"ca_file;TI"R;T:publicFI"I../lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb;T[ I"ca_path;T@#;F@$[ I" cert;T@#;F@$[ I"cert_store;T@#;F@$[ I"certificate;T@#;F@$[ I"ciphers;T@#;F@$[ I"debug_output;TI"RW;T;F@$[ I"headers;T@#;F@$[ I"http_versions;T@#;F@$[ I"idle_timeout;T@1;F@$[ I"keep_alive;T@1;F@$[ I"key;T@#;F@$[ I"max_requests;T@1;F@$[ I"max_version;T@#;F@$[ I"min_version;T@#;F@$[ I" name;T@#;F@$[ I" no_proxy;T@#;F@$[ I"open_timeout;T@1;F@$[ I"override_headers;T@#;F@$[ I"private_key;T@#;F@$[ I"proxy_uri;T@#;F@$[ I"read_timeout;T@1;F@$[ I"retry_change_requests;T@1;F@$[ I"reuse_ssl_sessions;T@1;F@$[ I"socket_options;T@#;F@$[ I"ssl_timeout;T@#;F@$[ I"ssl_version;T@#;F@$[ I"verify_callback;T@#;F@$[ I"verify_depth;T@#;F@$[ I"verify_mode;T@#;F@$[ I"write_timeout;T@1;F@$[U:RDoc::Constant[i I"DEFAULT_POOL_SIZE;TI"BBundler::Persistent::Net::HTTP::Persistent::DEFAULT_POOL_SIZE;T;0o;;[ ;@;0@@cRDoc::NormalClass0U;[i I"VERSION;TI"8Bundler::Persistent::Net::HTTP::Persistent::VERSION;T;0o;;[o; ;[I"LThe version of Bundler::Persistent::Net::HTTP::Persistent you are using;T;@;0@@@i0[ [[I" class;T[[;[[I"detect_idle_timeout;T@$[I"new;T@$[:protected[ [:private[ [I" instance;T[[;[)[I" ca_file=;T@$[I" ca_path=;T@$[I"can_retry?;T@$[I" cert=;T@$[I"cert_store=;T@$[I"certificate=;T@$[I" ciphers=;T@$[I"connection_for;T@$[I"error_message;T@$[I"escape;T@$[I" expired?;T@$[I"finish;T@$[I"http_version;T@$[I"idempotent?;T@$[I" key=;T@$[I"max_version=;T@$[I"min_version=;T@$[I"normalize_uri;T@$[I" pipeline;T@$[I"private_key=;T@$[I"proxy=;T@$[I"proxy_bypass?;T@$[I"proxy_from_env;T@$[I"reconnect;T@$[I"reconnect_ssl;T@$[I"request;T@$[I" reset;T@$[I" shutdown;T@$[I"ssl;T@$[I"ssl_timeout=;T@$[I"ssl_version=;T@$[I" start;T@$[I" unescape;T@$[I"verify_callback=;T@$[I"verify_depth=;T@$[I"verify_mode=;T@$[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[ I"Flib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb;TI"Qlib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb;TI"Klib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb;TI"Xlib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb;T@cRDoc::TopLevel