77件ヒット
[1-77件を表示]
(0.101秒)
種類
- インスタンスメソッド (55)
- 特異メソッド (22)
ライブラリ
-
cgi
/ core (11) -
net
/ http (22) - open-uri (22)
-
webrick
/ httprequest (11) -
webrick
/ httpresponse (11)
クラス
-
WEBrick
:: HTTPRequest (11) -
WEBrick
:: HTTPResponse (11)
モジュール
-
CGI
:: QueryExtension (11) -
Net
:: HTTPHeader (22) - OpenURI (22)
検索結果
先頭5件
-
WEBrick
:: HTTPResponse # content _ length -> Integer | nil (24332.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実......オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダはレスポンスに含まれず、IO から全てを読み込ん
でそれをエンティティボディとします。nil でないとき IO から content_length バイトだけ読み込みそ......は
content_length の値は無視され Content-Length ヘッダはレスポンスに含まれません。
@param len ヘッダの値を整数で指定します。nil を指定することは出来ません。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1"... -
Net
:: HTTPHeader # content _ length -> Integer|nil (24319.0) -
Content-Length: ヘッダフィールドの表している値を整数で返します。
...t-Length: ヘッダフィールドの表している値を整数で返します。
ヘッダが設定されていない場合には nil を返します。
@raise Net::HTTPHeaderSyntaxError フィールドの値が不正である場合に
発生します。
//emli......st[例][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
//}... -
CGI
:: QueryExtension # content _ length -> Integer (24317.0) -
ENV['CONTENT_LENGTH'] を返します。
...ENV['CONTENT_LENGTH'] を返します。... -
WEBrick
:: HTTPRequest # content _ length -> Integer (24301.0) -
リクエストの Content-Length ヘッダの値を整数で返します。リクエストに Content-Length ヘッダ が含まれていない場合は 0 を返します。
...リクエストの Content-Length ヘッダの値を整数で返します。リクエストに Content-Length ヘッダ
が含まれていない場合は 0 を返します。... -
Net
:: HTTPHeader # delete(key) -> [String] | nil (6218.0) -
key ヘッダフィールドを削除します。
...は
nil を返します。
//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 = 10
req.content_length # => 10
req.delete("Content-Length") # => ["10"]
req.content_length # => nil
//}... -
OpenURI
. open _ uri(name , mode = & # 39;r& # 39; , perm = nil , options = {}) -> StringIO (218.0) -
URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。
...します。ブロックの終了時に StringIO は close されます。nil を返します。
require 'open-uri'
sio = OpenURI.open_uri('http://www.example.com')
p sio.last_modified
puts sio.read
OpenURI.open_uri('http://www.example.com'){|sio| sio.read }
options には Hash を与......シンボル、
* :proxy
* :progress_proc
* :content_length_proc
* :http_basic_authentication
* :proxy_http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバ......('http://www.example.com',
{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })
: :proxy
プロクシの設定をします。
値には以下のいずれかを与えます。
//emlist{
文字列:... -
OpenURI
. open _ uri(name , mode = & # 39;r& # 39; , perm = nil , options = {}) {|sio| . . . } -> nil (218.0) -
URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。
...します。ブロックの終了時に StringIO は close されます。nil を返します。
require 'open-uri'
sio = OpenURI.open_uri('http://www.example.com')
p sio.last_modified
puts sio.read
OpenURI.open_uri('http://www.example.com'){|sio| sio.read }
options には Hash を与......シンボル、
* :proxy
* :progress_proc
* :content_length_proc
* :http_basic_authentication
* :proxy_http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバ......('http://www.example.com',
{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })
: :proxy
プロクシの設定をします。
値には以下のいずれかを与えます。
//emlist{
文字列:...