るりまサーチ

最速Rubyリファレンスマニュアル検索!
1032件ヒット [1-100件を表示] (0.029秒)

別のキーワード

  1. net/http get
  2. http start
  3. http get
  4. net/http start
  5. net/http delete

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Net::HTTPResponse#header -> self (21103.0)

互換性を保つためだけに導入されたメソッドです。 使わないでください。

互換性を保つためだけに導入されたメソッドです。
使わないでください。

自分自身を返します。

WEBrick::HTTPRequest#header -> Hash (21102.0)

ヘッダ名をキー、内容をその値とするハッシュを返します。キーも値も文字列です。

ヘッダ名をキー、内容をその値とするハッシュを返します。キーも値も文字列です。

WEBrick::HTTPResponse#header -> Hash (21102.0)

ヘッダ名をキー、ヘッダの値を値とするハッシュを返します。ハッシュのキーも値も文字列です。

ヘッダ名をキー、ヘッダの値を値とするハッシュを返します。ハッシュのキーも値も文字列です。

CGI#header(options = "text/html") -> String (18172.0)

HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。

...
HTTP
ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。
CGI#out を使わずに自力で HTML を出力したい場合などに使います。
このメソッドは文字列エンコーディングを変換しません。

ヘッダのキ...
...HTTP のバージョン、ステータスコード、
Date ヘッダをセットします。また Server と Connection の各ヘッダにもデフォルト値をセットします。
偽を指定する場合は、これらの値を明示的にセットしてください。
: status
HTTP
...
...gotiates"

@param options Hash か文字列で HTTP ヘッダを生成するための情報を指定します。

例:
header

# Content-Type: text/html

header
("text/plain")
# Content-Type: text/plain

header
({"nph" => true,
"statu...

Net::HTTPHeader#each_header {|name, val| .... } -> () (9126.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_header { |key,value| puts "#{key} = #{value}" }

# => accept-encoding = gzip;q=1.0,deflate;q=0.6,id...

絞り込み条件を変える

Net::HTTPResponse#reader_header -> self (9103.0)

互換性を保つためだけに導入されたメソッドです。 使わないでください。

互換性を保つためだけに導入されたメソッドです。
使わないでください。

自分自身を返します。

WEBrick::HTTPRequest#raw_header -> String (9102.0)

生のヘッダを返します。

生のヘッダを返します。

Net::HTTPHeader#fetch(key) -> String (6061.0)

key ヘッダフィールドを返します。

...y が存在する][ruby]{
require 'net/http'

uri = URI.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")...
.../http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.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) {|hash| .... } -> String (6061.0)

key ヘッダフィールドを返します。

...y が存在する][ruby]{
require 'net/http'

uri = URI.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")...
.../http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.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#[]...
<< 1 2 3 ... > >>