るりまサーチ

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

別のキーワード

  1. request new
  2. request sign
  3. request verify
  4. request to_der
  5. http request_get

検索結果

<< < ... 3 4 5 >>

Net::HTTPHeader#each_key {|name| ... } -> () (7.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_name {|name| ... } -> () (7.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| .... } -> () (7.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
# => */*
# => Ruby
//}...

Net::HTTPHeader#method -> String (7.0)

リクエストの HTTP メソッドを文字列で返します。

...リクエストの HTTP メソッドを文字列で返します。

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

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"
//}...

Net::HTTPHeader#proxy_basic_auth(account, password) -> [String] (7.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 (7.0)

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

...発生します。


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

uri = URI.parse('http://www.example.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 = {}) (7.0)

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

...指定します。

//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...
<< < ... 3 4 5 >>