ライブラリ
-
drb
/ extservm (11) -
net
/ http (429) - open-uri (11)
クラス
-
DRb
:: ExtServManager (11) -
Net
:: HTTPGenericRequest (33) -
Net
:: HTTPResponse (55)
モジュール
-
Net
:: HTTPHeader (341) -
OpenURI
:: OpenRead (11)
キーワード
- [] (11)
- []= (11)
-
basic
_ auth (11) -
body
_ stream (11) -
body
_ stream= (11) - chunked? (11)
-
content
_ length (11) -
content
_ length= (11) -
content
_ range (11) -
content
_ type (11) -
content
_ type= (11) - delete (11)
- each (11)
-
each
_ capitalized _ name (11) -
each
_ header (11) -
each
_ key (11) -
each
_ name (11) -
each
_ value (11) - fetch (33)
-
form
_ data= (11) -
get
_ fields (11) - key? (11)
-
main
_ type (11) - method (11)
- msg (11)
- path (11)
-
proxy
_ basic _ auth (11) - range (11)
-
range
_ length (11) - read (11)
-
read
_ body (22) -
set
_ content _ type (11) -
set
_ form _ data (11) -
sub
_ type (11) -
type
_ params (11) - value (11)
検索結果
先頭5件
-
DRb
:: ExtServManager # uri=(uri) (24101.0) -
サービス起動時にプロセスを spawn する時に渡す URI を設定します。
...サービス起動時にプロセスを spawn する時に渡す URI を設定します。
@see DRb::ExtServManager#uri... -
Net
:: HTTPHeader # content _ range -> Range|nil (15407.0) -
Content-Range: ヘッダフィールドの値を Range で返します。 Range の表わす長さは Net::HTTPHeader#range_length で得られます。
...Content-Range: ヘッダフィールドの値を Range で返します。
Range の表わす長さは Net::HTTPHeader#range_length で得られます。
ヘッダが設定されていない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.exam......ple.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_range # => nil
req['Content-Range'] = "bytes 0-499/1234"
req.content_range # => 0..499
//}... -
Net
:: HTTPHeader # range _ length -> Integer|nil (15307.0) -
Content-Range: ヘッダフィールドの表している長さを整数で返します。
...Content-Range: ヘッダフィールドの表している長さを整数で返します。
ヘッダが設定されていない場合には nil を返します。
@raise Net::HTTPHeaderSyntaxError Content-Range: ヘッダフィールド
の値が不正である......発生します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['Content-Range'] = "bytes 1-500/1000"
req.range_length # => 500
//}... -
Net
:: HTTPHeader # range -> Range|nil (12413.0) -
Range: ヘッダの示す範囲を Range オブジェクトで返します。
...Range: ヘッダの示す範囲を Range オブジェクトで返します。
ヘッダにない場合は nil を返します。
@raise Net::HTTPHeaderSyntaxError Range:ヘッダの中身が規格通り
でない場合に発生します。
//emlist[例 正常な......uire 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['range'] = "bytes=1-5"
req.range # => [1..5]
//}
//emlist[例 Net::HTTPHeaderSyntaxError][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HT......TP::Get.new(uri.request_uri)
req['range'] = "invalid"
req.range # => Net::HTTPHeaderSyntaxError
//}... -
Net
:: HTTPHeader # content _ length -> Integer|nil (12307.0) -
Content-Length: ヘッダフィールドの表している値を整数で返します。
...Content-Length: ヘッダフィールドの表している値を整数で返します。
ヘッダが設定されていない場合には nil を返します。
@raise Net::HTTPHeaderSyntaxError フィールドの値が不正である場合に
発生します。......//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length # => nil
req.content_length = 10
req.content_length # => 10
//}... -
Net
:: HTTPHeader # each _ capitalized _ name {|name| . . . . } -> () (12307.0) -
保持しているヘッダ名を正規化 ('x-my-header' -> 'X-My-Header') して、ブロックに渡します。
...-header' -> 'X-My-Header')
して、ブロックに渡します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_capitalized_name { |key| puts key }
# => Accept-Encoding
# => Accept
# => User-Agent... -
Net
:: HTTPHeader # each _ name {|name| . . . } -> () (12307.0) -
保持しているヘッダ名をブロックに渡して呼びだします。
...呼びだします。
ヘッダ名は小文字で統一されます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_name { |name| puts name }
# => accept-encoding
# => accept
# => user-agent
//}... -
Net
:: HTTPHeader # set _ content _ type(type , params = {}) (12307.0) -
type と params から Content-Type: ヘッダフィールドの 値を設定します。
...params から Content-Type: ヘッダフィールドの
値を設定します。
@param type メディアタイプを文字列で指定します。
@param params パラメータ属性をハッシュで指定します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.......com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data' # => "multipart/form-data"
req.content_type # => "multipart/form-data"
//}... -
OpenURI
:: OpenRead # read(options = {}) -> String (12213.0) -
自身が表す内容を読み込んで文字列として返します。 self.open(options={}) {|io| io.read } と同じです。 このメソッドによって返される文字列は OpenURI::Meta によって extend されています。
...lf.open(options={}) {|io| io.read } と同じです。
このメソッドによって返される文字列は OpenURI::Meta
によって extend されています。
@param options ハッシュを与えます。
require 'open-uri'
uri = URI.parse('http://www.example.com/')
str = uri.read
p......str.is_a?(OpenURI::Meta) # => true
p str.content_type... -
Net
:: HTTPGenericRequest # path -> String (12207.0) -
リクエストする path を文字列で返します。
...リクエストする path を文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.path # => "/index.html"
//}...