MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 216.73.216.153
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /proc/thread-self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/OpenURI/OpenRead/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //proc/thread-self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/OpenURI/OpenRead/open-i.ri
U:RDoc::AnyMethod[iI"	open:EFI"OpenURI::OpenRead#open;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I"GOpenURI::OpenRead#open provides `open' for URI::HTTP and URI::FTP.;To:RDoc::Markup::BlankLineo;
;	[I":OpenURI::OpenRead#open takes optional 3 arguments as:;T@o:RDoc::Markup::Verbatim;	[I"GOpenURI::OpenRead#open([mode [, perm]] [, options]) [{|io| ... }]
;T:@format0o;
;	[I"MOpenURI::OpenRead#open returns an IO-like object if block is not given. ;TI"JOtherwise it yields the IO object and return the value of the block. ;TI"2The IO object is extended with OpenURI::Meta.;T@o;
;	[I"3+mode+ and +perm+ are the same as Kernel#open.;T@o;
;	[I"NHowever, +mode+ must be read mode because OpenURI::OpenRead#open doesn't ;TI"support write mode (yet). ;TI"LAlso +perm+ is ignored because it is meaningful only for file creation.;T@o;
;	[I"+options+ must be a hash.;T@o;
;	[I"MEach option with a string key specifies an extra header field for HTTP. ;TI"4I.e., it is ignored for FTP without HTTP proxy.;T@o;
;	[I"@The hash may include other options, where keys are symbols:;T@o:RDoc::Markup::List:
@type:
LABEL:@items[o:RDoc::Markup::ListItem:@label[I":proxy;T;	[o;
;	[I"Synopsis:;To;;	[
I",:proxy => "http://proxy.foo.com:8000/"
;TI"7:proxy => URI.parse("http://proxy.foo.com:8000/")
;TI":proxy => true
;TI":proxy => false
;TI":proxy => nil
;T;
0o;
;	[I"EIf :proxy option is specified, the value should be String, URI, ;TI"boolean or nil.;T@o;
;	[I"=When String or URI is given, it is treated as proxy URI.;T@o;
;	[I"?When true is given or the option itself is not specified, ;TI"6environment variable `scheme_proxy' is examined. ;TI"6`scheme' is replaced by `http', `https' or `ftp'.;T@o;
;	[I"KWhen false or nil is given, the environment variables are ignored and ;TI"2connection will be made to a server directly.;T@o;;[I"%:proxy_http_basic_authentication;T;	[
o;
;	[I"Synopsis:;To;;	[
I"):proxy_http_basic_authentication =>
;TI"F  ["http://proxy.foo.com:8000/", "proxy-user", "proxy-password"]
;TI"):proxy_http_basic_authentication =>
;TI"1  [URI.parse("http://proxy.foo.com:8000/"),
;TI"(   "proxy-user", "proxy-password"]
;T;
0o;
;	[	I"HIf :proxy option is specified, the value should be an Array with 3 ;TI"Melements.  It should contain a proxy URI, a proxy user name and a proxy ;TI"Lpassword.  The proxy URI should be a String, an URI or nil.  The proxy ;TI"/user name and password should be a String.;T@o;
;	[I"DIf nil is given for the proxy URI, this option is just ignored.;T@o;
;	[I"BIf :proxy and :proxy_http_basic_authentication is specified, ;TI"ArgumentError is raised.;T@o;;[I":http_basic_authentication;T;	[	o;
;	[I"Synopsis:;To;;	[I"2:http_basic_authentication=>[user, password]
;T;
0o;
;	[	I"1If :http_basic_authentication is specified, ;TI"<the value should be an array which contains 2 strings: ;TI"username and password. ;TI"BIt is used for HTTP Basic authentication defined by RFC 2617.;T@o;;[I":content_length_proc;T;	[
o;
;	[I"Synopsis:;To;;	[I"<:content_length_proc => lambda {|content_length| ... }
;T;
0o;
;	[I"MIf :content_length_proc option is specified, the option value procedure ;TI"2is called before actual transfer is started. ;TI"FIt takes one argument, which is expected content length in bytes.;T@o;
;	[I"EIf two or more transfers are performed by HTTP redirection, the ;TI"9procedure is called only once for the last transfer.;T@o;
;	[I"KWhen expected content length is unknown, the procedure is called with ;TI"Lnil.  This happens when the HTTP response has no Content-Length header.;T@o;;[I":progress_proc;T;	[o;
;	[I"Synopsis:;To;;	[I"+:progress_proc => lambda {|size| ...}
;T;
0o;
;	[I"HIf :progress_proc option is specified, the proc is called with one ;TI"Hargument each time when `open' gets content fragment from network. ;TI"FThe argument +size+ is the accumulated transferred size in bytes.;T@o;
;	[I"HIf two or more transfer is done by HTTP redirection, the procedure ;TI",is called only one for a last transfer.;T@o;
;	[I"I:progress_proc and :content_length_proc are intended to be used for ;TI"progress bar. ;TI"JFor example, it can be implemented as follows using Ruby/ProgressBar.;T@o;;	[I"pbar = nil
;TI"open("http://...",
;TI"+  :content_length_proc => lambda {|t|
;TI"    if t && 0 < t
;TI",      pbar = ProgressBar.new("...", t)
;TI"#      pbar.file_transfer_mode
;TI"
    end
;TI"
  },
;TI"%  :progress_proc => lambda {|s|
;TI"    pbar.set s if pbar
;TI"  }) {|f| ... }
;T;
0o;;[I":read_timeout;T;	[	o;
;	[I"Synopsis:;To;;	[I"):read_timeout=>nil     (no timeout)
;TI"(:read_timeout=>10      (10 second)
;T;
0o;
;	[I"K:read_timeout option specifies a timeout of read for http connections.;T@o;;[I":open_timeout;T;	[	o;
;	[I"Synopsis:;To;;	[I"):open_timeout=>nil     (no timeout)
;TI"(:open_timeout=>10      (10 second)
;T;
0o;
;	[I"K:open_timeout option specifies a timeout of open for http connections.;T@o;;[I":ssl_ca_cert;T;	[	o;
;	[I"Synopsis:;To;;	[I"5:ssl_ca_cert=>filename or an Array of filenames
;T;
0o;
;	[I"=:ssl_ca_cert is used to specify CA certificate for SSL. ;TI"7If it is given, default certificates are not used.;T@o;;[I":ssl_verify_mode;T;	[	o;
;	[I"Synopsis:;To;;	[I":ssl_verify_mode=>mode
;T;
0o;
;	[I"=:ssl_verify_mode is used to specify openssl verify mode.;T@o;;[I":ftp_active_mode;T;	[	o;
;	[I"Synopsis:;To;;	[I":ftp_active_mode=>bool
;T;
0o;
;	[I"H<tt>:ftp_active_mode => true</tt> is used to make ftp active mode. ;TI",Ruby 1.9 uses passive mode by default. ;TI"?Note that the active mode is default in Ruby 1.8 or prior.;T@o;;[I":redirect;T;	[
o;
;	[I"Synopsis:;To;;	[I":redirect=>bool
;T;
0o;
;	[I"M+:redirect+ is true by default.  <tt>:redirect => false</tt> is used to ;TI" disable all HTTP redirects.;T@o;
;	[I"<OpenURI::HTTPRedirect exception raised on redirection. ;TI"HUsing +true+ also means that redirections between http and ftp are ;TI"permitted.;T:
@fileI"lib/open-uri.rb;T:0@omit_headings_from_table_of_contents_below000[I"(*rest, &block);T@FI"
OpenRead;FcRDoc::NormalModule00

MMCT - 2023