480件ヒット
[201-300件を表示]
(0.077秒)
ライブラリ
-
net
/ http (408) - uri (12)
-
webrick
/ httprequest (36) -
webrick
/ httpresponse (24)
クラス
-
Net
:: HTTPGenericRequest (96) -
URI
:: HTTP (12) -
WEBrick
:: HTTPRequest (36) -
WEBrick
:: HTTPResponse (24)
モジュール
-
Net
:: HTTPHeader (312)
キーワード
- [] (12)
- []= (12)
-
basic
_ auth (12) - body (12)
- body= (12)
-
body
_ stream (12) -
body
_ stream= (12) - chunked? (12)
-
content
_ length (12) -
content
_ length= (12) -
content
_ range (12) -
content
_ type (12) -
content
_ type= (12) - delete (12)
- each (12)
-
each
_ capitalized _ name (12) -
each
_ header (12) -
each
_ key (12) -
each
_ name (12) -
each
_ value (12) - fetch (36)
-
form
_ data= (12) - method (24)
- path (12)
-
proxy
_ basic _ auth (12) -
query
_ string (12) -
query
_ string= (12) - range (12)
-
range
_ length (12) -
request
_ body _ permitted? (12) -
request
_ uri= (12) -
response
_ body _ permitted? (12) -
set
_ content _ type (12) -
set
_ form _ data (12)
検索結果
先頭5件
-
Net
:: HTTPGenericRequest # body=(body) (7.0) -
サーバに送るリクエストのエンティティボディを文字列で設定します。
...。
@param body 設定するボディを文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.body = "Test Post Data" # => "Test Post Data"
//}
@see Net::HTTPGenericRequest#body... -
Net
:: HTTPGenericRequest # body _ stream -> object (7.0) -
サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。
...を与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
File.open("/path/to/test", 'rb') do |f|
# 大きなファイルを扱う際にメモリ消費を少なくできる
post.body_stream = f... -
Net
:: HTTPGenericRequest # body _ stream=(f) (7.0) -
サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。
...を与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
File.open("/path/to/test", 'rb') do |f|
# 大きなファイルを扱う際にメモリ消費を少なくできる
post.body_stream = f... -
Net
:: HTTPGenericRequest # path -> String (7.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"
//}... -
Net
:: HTTPHeader # [](key) -> String|nil (7.0) -
key ヘッダフィールドを返します。
...l を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['user-agent'] # => Ruby
//}
一種類のヘッダフィールドが一つのヘッダの中に複数存在する
場合にはそれを全... -
Net
:: HTTPHeader # []=(key , val) (7.0) -
key ヘッダフィールドに文字列 val をセットします。
...を与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['user-agent'] # => Ruby
req['user-agent'] = "update"
req['user-agent'] # => update
//}
@see Net::HTTPHeader#[] ,
Net::HTTPHeader#add_f... -
Net
:: HTTPHeader # basic _ auth(account , password) -> [String] (7.0) -
Authorization: ヘッダを BASIC 認証用にセットします。
...ト名を文字列で与えます。
@param password パスワードを文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.basic_auth("user", "pass") # => ["Basic dXNlcjpwYXNz"]
//}... -
Net
:: HTTPHeader # chunked? -> bool (7.0) -
Transfer-Encoding: ヘッダフィールドが "chunked" である 場合に真を返します。
...ったり、
"chunked" 以外である場合には偽を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.chunked? # => false
req["Transfer-Encoding"] = "chunked"
req.chunked? # => true
//}... -
Net
:: HTTPHeader # content _ length -> Integer|nil (7.0) -
Content-Length: ヘッダフィールドの表している値を整数で返します。
...正である場合に
発生します。
//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
//}...