80件ヒット
[1-80件を表示]
(0.078秒)
ライブラリ
- ビルトイン (8)
-
net
/ http (36) -
rubygems
/ remote _ fetcher (36)
クラス
-
Gem
:: RemoteFetcher (36) - Thread (8)
モジュール
-
Net
:: HTTPHeader (36)
キーワード
- [] (8)
-
get
_ file _ uri _ path (12) -
get
_ proxy _ from _ env (12) - request (12)
検索結果
先頭5件
-
Net
:: HTTPHeader # fetch(key) -> String (18146.0) -
key ヘッダフィールドを返します。
...= URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("user-agent") # => "Ruby"
//}
//emlist[例 key のみ指定。key が存在しない][ruby]{
require 'net/http'
begin
req.fetch("content-length")
rescue => e
e # => #<KeyError: key not found:......l')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "default") # => "default"
//}
//emlist[例 key とブロックを指定][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length") {... -
Net
:: HTTPHeader # fetch(key) {|hash| . . . . } -> String (18146.0) -
key ヘッダフィールドを返します。
...= URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("user-agent") # => "Ruby"
//}
//emlist[例 key のみ指定。key が存在しない][ruby]{
require 'net/http'
begin
req.fetch("content-length")
rescue => e
e # => #<KeyError: key not found:......l')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "default") # => "default"
//}
//emlist[例 key とブロックを指定][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length") {... -
Net
:: HTTPHeader # fetch(key , default) -> String (18146.0) -
key ヘッダフィールドを返します。
...= URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("user-agent") # => "Ruby"
//}
//emlist[例 key のみ指定。key が存在しない][ruby]{
require 'net/http'
begin
req.fetch("content-length")
rescue => e
e # => #<KeyError: key not found:......l')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "default") # => "default"
//}
//emlist[例 key とブロックを指定][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length") {... -
Gem
:: RemoteFetcher # get _ file _ uri _ path(uri) -> String (9102.0) -
与えられた URI から "file://" を取り除いた文字列を返します。
与えられた URI から "file://" を取り除いた文字列を返します。
@param uri URI を表す文字列を指定します。 -
Gem
:: RemoteFetcher # get _ proxy _ from _ env -> URI | nil (9102.0) -
環境変数にセットされている HTTP proxy の情報を取得して返します。
環境変数にセットされている HTTP proxy の情報を取得して返します。
ここでチェックしている環境変数は以下の通りです。
* http_proxy
* http_proxy_user
* http_proxy_pass
* HTTP_PROXY
* HTTP_PROXY_USER
* HTTP_PROXY_PASS -
Gem
:: RemoteFetcher # request(uri , request _ class , last _ modified = nil) -> Net :: HTTPResponse (3013.0) -
与えられた URI に対してリクエストを実行し、Net::HTTPResponse を返します。
...てリクエストを実行し、Net::HTTPResponse を返します。
@param uri URI を指定します。
@param request_class Net::HTTP::Head か Net::HTTP::Get を指定します。
@param last_modified 最終更新時刻を指定します。
@see Net::HTTP, Net::HTTP::Head, Net::HTTP::Get... -
Thread
# [](name) -> object | nil (13.0) -
name に対応したスレッドに固有のデータを取り出します。 name に対応するスレッド固有データがなければ nil を返し ます。
...rrent[:name]
# => nil if fiber-local
# => 2 if thread-local (The value 2 is leaked to outside of meth method.)
//}
Fiber を切り替えても同じ変数を返したい場合は
Thread#thread_variable_get と Thread#thread_variable_set
を使用してください。
@see Thread#fetch, Thread#[]=...