132件ヒット
[1-100件を表示]
(0.117秒)
ライブラリ
-
cgi
/ core (22) - csv (22)
-
net
/ http (66) -
webrick
/ httprequest (11) -
webrick
/ httpresponse (11)
クラス
- CGI (22)
-
CSV
:: Row (22) -
WEBrick
:: HTTPRequest (11) -
WEBrick
:: HTTPResponse (11)
モジュール
-
Net
:: HTTPHeader (66)
キーワード
- << (11)
- fetch (33)
-
form
_ data= (11) - out (11)
-
set
_ form _ data (11) -
to
_ hash (11) -
type
_ params (11)
検索結果
先頭5件
-
WEBrick
:: HTTPRequest # header -> Hash (18203.0) -
ヘッダ名をキー、内容をその値とするハッシュを返します。キーも値も文字列です。
ヘッダ名をキー、内容をその値とするハッシュを返します。キーも値も文字列です。 -
WEBrick
:: HTTPResponse # header -> Hash (18203.0) -
ヘッダ名をキー、ヘッダの値を値とするハッシュを返します。ハッシュのキーも値も文字列です。
ヘッダ名をキー、ヘッダの値を値とするハッシュを返します。ハッシュのキーも値も文字列です。 -
CGI
# header(options = "text / html") -> String (18144.0) -
HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。
...ant Also Negotiates"
@param options Hash か文字列で HTTP ヘッダを生成するための情報を指定します。
例:
header
# Content-Type: text/html
header("text/plain")
# Content-Type: text/plain
header({"nph" => true,......e.now + 30,
"cookie" => [cookie1, cookie2],
"my_header1" => "my_value",
"my_header2" => "my_value"})
例:
cgi = CGI.new('html3')
print cgi.header({"charset" => "shift_jis", "status" => "OK"})
print "<html><head><title>TIT... -
CSV
:: Row # to _ hash -> Hash (6239.0) -
自身をシンプルなハッシュに変換します。
...プルなハッシュに変換します。
フィールドの順序は無視されます。
重複したフィールドは削除されます。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header2", "header1", "header2"], [1, 2, 3])
row.to_hash # => {"header2"=>3, "header1"=>2}
//}... -
Net
:: HTTPHeader # type _ params -> Hash (3118.0) -
Content-Type のパラメータを {"charset" => "iso-2022-jp"} という形の Hash で返します。
...Content-Type のパラメータを {"charset" => "iso-2022-jp"}
という形の Hash で返します。
Content-Type: ヘッダフィールドが存在しない場合には
空のハッシュを返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.h... -
Net
:: HTTPHeader # fetch(key) {|hash| . . . . } -> String (3102.0) -
key ヘッダフィールドを返します。
...q.fetch("content-length", "default") # => "default"
//}
//emlist[例 key とブロックを指定][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") { |e| 99 } # => 99
//}
@see Net::HTTPHeader#[]... -
Net
:: HTTPHeader # form _ data=(params) (3007.0) -
HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。
...ダフィールド Content-Type: には
'application/x-www-form-urlencoded' が設定されます。
@param params HTML のフォームデータの Hash を与えます。
@param sep データのセパレータを文字列で与えます。
//emlist[例 form_data][ruby]{
require 'net/http'
uri =... -
Net
:: HTTPHeader # set _ form _ data(params , sep = & # 39;&& # 39;) -> () (3007.0) -
HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。
...ダフィールド Content-Type: には
'application/x-www-form-urlencoded' が設定されます。
@param params HTML のフォームデータの Hash を与えます。
@param sep データのセパレータを文字列で与えます。
//emlist[例 form_data][ruby]{
require 'net/http'
uri =... -
Net
:: HTTPHeader # fetch(key) -> String (3002.0) -
key ヘッダフィールドを返します。
...q.fetch("content-length", "default") # => "default"
//}
//emlist[例 key とブロックを指定][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") { |e| 99 } # => 99
//}
@see Net::HTTPHeader#[]... -
Net
:: HTTPHeader # fetch(key , default) -> String (3002.0) -
key ヘッダフィールドを返します。
...q.fetch("content-length", "default") # => "default"
//}
//emlist[例 key とブロックを指定][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") { |e| 99 } # => 99
//}
@see Net::HTTPHeader#[]...