るりまサーチ

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

別のキーワード

  1. request new
  2. http request_put
  3. http request_get
  4. http request
  5. http request_head

検索結果

<< < ... 3 4 5 >>

Net::HTTPHeader#each_name {|name| ... } -> () (3025.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_name { |name| puts name }

# => accept-encoding
# => accept
# => user-agent
//}...

Net::HTTPHeader#each_value {|value| .... } -> () (3025.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_value { |value| puts value }

# => gzip;q=1.0,deflate;q=0.6,identity;q=0.3
# => */*
# => Ru...

Net::HTTPHeader#proxy_basic_auth(account, password) -> [String] (3025.0)

Proxy 認証のために Proxy-Authorization: ヘッダをセットします。

...ます。
@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.proxy_basic_auth("account", "password") # => ["Basic YWNjb3VudDpwYXNzd29yZA=="]
//}...

Net::HTTPHeader#range_length -> Integer|nil (3025.0)

Content-Range: ヘッダフィールドの表している長さを整数で返します。

...aise Net::HTTPHeaderSyntaxError Content-Range: ヘッダフィールド
の値が不正である場合に
発生します。


//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.ex...
...ample.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['Content-Range'] = "bytes 1-500/1000"
req.range_length # => 500
//}...

Net::HTTPHeader#set_content_type(type, params = {}) (3025.0)

type と params から Content-Type: ヘッダフィールドの 値を設定します。

...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' # =>...

絞り込み条件を変える

WEBrick::HTTPRequest#query_string -> String (3017.0)

リクエスト URI のクエリーを文字列で表すアクセサです。 デフォルトは request_uri.query です。

...リクエスト URI のクエリーを文字列で表すアクセサです。
デフォルトは request_uri.query です。...

WEBrick::HTTPRequest#query_string=(value) (3017.0)

リクエスト URI のクエリーを文字列で表すアクセサです。 デフォルトは request_uri.query です。

...リクエスト URI のクエリーを文字列で表すアクセサです。
デフォルトは request_uri.query です。

@param value クエリーを表す文字列を指定します。...
<< < ... 3 4 5 >>