960件ヒット
[1-100件を表示]
(0.108秒)
ライブラリ
-
net
/ http (588) - open-uri (12)
- optparse (144)
-
rexml
/ streamlistener (12) - uri (168)
-
webrick
/ httprequest (12) -
webrick
/ httpresponse (12) -
webrick
/ https (12)
クラス
-
Net
:: HTTPGenericRequest (96) -
Net
:: HTTPResponse (108) - OptionParser (144)
-
URI
:: Generic (156) -
URI
:: HTTP (12) -
WEBrick
:: HTTPRequest (24) -
WEBrick
:: HTTPResponse (12)
モジュール
-
Net
:: HTTPExceptions (12) -
Net
:: HTTPHeader (372) -
OpenURI
:: OpenRead (12) -
REXML
:: StreamListener (12)
キーワード
- [] (12)
- []= (12)
- absolute (12)
- absolute? (12)
-
basic
_ auth (12) - body (24)
- body= (12)
-
body
_ stream (12) -
body
_ stream= (12) - chunked? (12)
- code (12)
- coerce (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) - entity (12)
- entitydecl (12)
- fetch (36)
-
form
_ data= (12) - fragment (12)
-
get
_ fields (12) -
http
_ version (12) - key? (12)
-
main
_ type (12) - method (24)
- msg (12)
- normalize! (12)
- on (144)
- opaque (12)
- path (24)
-
proxy
_ basic _ auth (12) - query (12)
- range (12)
-
range
_ length (12) - read (12)
-
read
_ body (24) - relative? (12)
-
request
_ body _ permitted? (12) -
request
_ uri (12) - response (12)
-
response
_ body _ permitted? (12) -
route
_ from (12) -
route
_ to (12) - select (12)
-
set
_ content _ type (12) -
set
_ form _ data (12) -
sub
_ type (12) -
to
_ s (12) -
type
_ params (12) -
unparsed
_ uri (12) - value (12)
検索結果
先頭5件
-
WEBrick
:: HTTPRequest # parse(socket = nil) -> () (24202.0) -
指定された socket からクライアントのリクエストを読み込み、 自身のアクセサなどを適切に設定します。
...指定された socket からクライアントのリクエストを読み込み、
自身のアクセサなどを適切に設定します。
@param socket クライアントに接続された IO オブジェクトを指定します。... -
Net
:: HTTPResponse # http _ version -> String (15248.0) -
サーバがサポートしている HTTP のバージョンを文字列で返します。
...サーバがサポートしている HTTP のバージョンを文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.http_version # => "1.1"
//}... -
Net
:: HTTPHeader # set _ content _ type(type , params = {}) (12225.0) -
type と params から Content-Type: ヘッダフィールドの 値を設定します。
...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"
//}... -
WEBrick
:: HTTPRequest # unparsed _ uri -> String (12201.0) -
リクエストの URI を文字列で返します。
リクエストの URI を文字列で返します。 -
Net
:: HTTPHeader # content _ length -> Integer|nil (9225.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 # fetch(key) -> String (9179.0) -
key ヘッダフィールドを返します。
...ドを返します。
たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。
該当するキーが登録されてい
ない時には、引数 default が与えられていればその値を、ブ......efault 該当するキーが登録されていない時の返り値を指定します。
@raise IndexError 引数defaultもブロックも与えられてない時、キーの探索に 失敗すると発生します。
//emlist[例 key のみ指定。key が存在する][ruby]{
require 'net/http'
u.......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: "conte... -
Net
:: HTTPHeader # fetch(key) {|hash| . . . . } -> String (9179.0) -
key ヘッダフィールドを返します。
...ドを返します。
たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。
該当するキーが登録されてい
ない時には、引数 default が与えられていればその値を、ブ......efault 該当するキーが登録されていない時の返り値を指定します。
@raise IndexError 引数defaultもブロックも与えられてない時、キーの探索に 失敗すると発生します。
//emlist[例 key のみ指定。key が存在する][ruby]{
require 'net/http'
u.......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: "conte... -
Net
:: HTTPHeader # fetch(key , default) -> String (9179.0) -
key ヘッダフィールドを返します。
...ドを返します。
たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。
該当するキーが登録されてい
ない時には、引数 default が与えられていればその値を、ブ......efault 該当するキーが登録されていない時の返り値を指定します。
@raise IndexError 引数defaultもブロックも与えられてない時、キーの探索に 失敗すると発生します。
//emlist[例 key のみ指定。key が存在する][ruby]{
require 'net/http'
u.......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: "conte... -
Net
:: HTTPHeader # form _ data=(params) (9149.0) -
HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。
...HTMLのフォームのデータ params から
ヘッダフィールドとボディを設定します。
ヘッダフィールド Content-Type: には
'application/x-www-form-urlencoded' が設定されます。
@param params HTML のフォームデータの Hash を与えます。
@param sep デ......ist[例 form_data][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} # => {"q"=>["ruby", "perl"], "lang"=>"en"}
//}
//emlist[例 set_form_data][ruby]{
require 'net/http'......uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.set_form_data({"q" => "ruby", "lang" => "en"}, ';') # => "application/x-www-form-urlencoded"
//}...