るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.057秒)

別のキーワード

  1. openssl new
  2. openssl digest
  3. openssl to_der
  4. openssl to_s
  5. openssl hexdigest

モジュール

キーワード

検索結果

OpenURI.open_uri(name, mode = 'r', perm = nil, options = {}) -> StringIO (9238.0)

URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。

...quire 'open-uri'
sio = OpenURI.open_uri('http://www.example.com')
p
sio.last_modified
p
uts sio.read

OpenURI.open_uri('http://www.example.com'){|sio| sio.read }

options には Hash を与えます。理解するハッシュの
キーは以下のシンボル、
* :proxy
* :progress_proc
*...
...* :proxy_http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバーに
利用されることを想定しています。

require 'open-uri'
sio = OpenURI.open_...
...uri('http://www.example.com',
{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })

: :proxy
プロクシの設定をします。
値には以下のいずれかを与えます。
//emlist{
文字...

OpenURI.open_uri(name, mode = 'r', perm = nil, options = {}) {|sio| ... } -> nil (9238.0)

URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。

...quire 'open-uri'
sio = OpenURI.open_uri('http://www.example.com')
p
sio.last_modified
p
uts sio.read

OpenURI.open_uri('http://www.example.com'){|sio| sio.read }

options には Hash を与えます。理解するハッシュの
キーは以下のシンボル、
* :proxy
* :progress_proc
*...
...* :proxy_http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバーに
利用されることを想定しています。

require 'open-uri'
sio = OpenURI.open_...
...uri('http://www.example.com',
{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })

: :proxy
プロクシの設定をします。
値には以下のいずれかを与えます。
//emlist{
文字...

OpenURI::Meta#meta -> Hash (3014.0)

ヘッダを収録したハッシュを返します。

...す。

//emlist[例][ruby]{
require 'open-uri'
open('http://example.com/') {|f|
p
f.meta
#=> {"date"=>"Sun, 04 May 2008 11:26:40 GMT",
# "content-type"=>"text/html;charset=utf-8",
# "server"=>"Apache/2.0.54 (Debian GNU/Linux) mod_ssl/2.0.54 OpenSSL/0.9.7e",
# "transfer-encoding"=...
...

//emlist[例][ruby]{
require 'open-uri'
URI.open('http://example.com/') {|f|
p
f.meta
#=> {"date"=>"Sun, 04 May 2008 11:26:40 GMT",
# "content-type"=>"text/html;charset=utf-8",
# "server"=>"Apache/2.0.54 (Debian GNU/Linux) mod_ssl/2.0.54 OpenSSL/0.9.7e",
# "transfer-encoding"...