228件ヒット
[1-100件を表示]
(0.081秒)
ライブラリ
-
net
/ http (36) -
rubygems
/ remote _ fetcher (156) -
rubygems
/ spec _ fetcher (36)
クラス
-
Gem
:: RemoteFetcher (144) -
Gem
:: RemoteFetcher :: FetchError (12) -
Gem
:: SpecFetcher (36)
モジュール
-
Net
:: HTTPHeader (36)
キーワード
-
cache
_ dir (12) -
connection
_ for (12) - download (12)
- escape (12)
-
fetch
_ path (12) -
fetch
_ size (12) -
fetch
_ spec (12) -
file
_ uri? (12) -
get
_ file _ uri _ path (12) -
get
_ proxy _ from _ env (12) -
load
_ specs (12) -
normalize
_ uri (12) -
open
_ uri _ or _ path (12) - request (12)
- unescape (12)
検索結果
先頭5件
-
Gem
:: RemoteFetcher :: FetchError # uri -> URI (24319.0) -
問題が発生した URI を返します。
...問題が発生した URI を返します。... -
Net
:: HTTPHeader # fetch(key) -> String (18336.0) -
key ヘッダフィールドを返します。
...key ヘッダフィールドを返します。
たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。
該当するキーが登録されてい
ない時には、引数 default が与えられてい......[ruby]{
require 'net/http'
uri = 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: "content-length">
end
//}
//emlist[例 key , default を指定][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", "default") # => "default"
//}
//emlist[例 key とブ... -
Net
:: HTTPHeader # fetch(key) {|hash| . . . . } -> String (18336.0) -
key ヘッダフィールドを返します。
...key ヘッダフィールドを返します。
たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。
該当するキーが登録されてい
ない時には、引数 default が与えられてい......[ruby]{
require 'net/http'
uri = 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: "content-length">
end
//}
//emlist[例 key , default を指定][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", "default") # => "default"
//}
//emlist[例 key とブ... -
Net
:: HTTPHeader # fetch(key , default) -> String (18336.0) -
key ヘッダフィールドを返します。
...key ヘッダフィールドを返します。
たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。
該当するキーが登録されてい
ない時には、引数 default が与えられてい......[ruby]{
require 'net/http'
uri = 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: "content-length">
end
//}
//emlist[例 key , default を指定][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", "default") # => "default"
//}
//emlist[例 key とブ... -
Gem
:: RemoteFetcher # open _ uri _ or _ path(uri , last _ modified = nil , head = false , depth = 0) -> StringIO | File (9341.0) -
@param uri URI を指定します。
...@param uri URI を指定します。
@param last_modified 最終更新時刻を指定します。
@param head 真を指定するとヘッダ情報のみ取得します。
@param depth 現在のリダイレクト回数を指定します。
@raise Gem::RemoteFetcher::FetchError デフォルトで......は 11 回リダイレクトした場合に発生します。
depth を指定すると 10 - depth 回より多くリダイレクトした場合にこの例外が発生するようになります。
また HTTP のレスポンスが想定外のものの場合にも発生します。... -
Gem
:: RemoteFetcher # fetch _ path(uri , mtime = nil , head = false) -> String | Hash (9331.0) -
与えられた URI からダウンロードしたデータを文字列として返します。
...与えられた URI からダウンロードしたデータを文字列として返します。
ヘッダ情報のみ取得した場合はハッシュを返します。
@param uri データ取得先の URI を指定します。
@param mtime 更新時刻を指定します。
@param head 真を... -
Gem
:: RemoteFetcher # fetch _ size(uri) -> Integer (9331.0) -
与えられた URI からダウンロードするデータのサイズを返します。
...与えられた URI からダウンロードするデータのサイズを返します。
@param uri データ取得先の URI を指定します。... -
Gem
:: RemoteFetcher # get _ file _ uri _ path(uri) -> String (9331.0) -
与えられた URI から "file://" を取り除いた文字列を返します。
...与えられた URI から "file://" を取り除いた文字列を返します。
@param uri URI を表す文字列を指定します。... -
Gem
:: RemoteFetcher # normalize _ uri(uri) -> String (9331.0) -
URI のスキーム部分が欠けている場合に "http://" を補って返します。
...
URI のスキーム部分が欠けている場合に "http://" を補って返します。
@param uri URI 文字列を指定します。...