るりまサーチ

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

別のキーワード

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

ライブラリ

検索結果

<< < ... 2 3 4 >>

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

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

...ールドの表している長さを整数で返します。

ヘッダが設定されていない場合には nil を返します。

@raise Net::HTTPHeaderSyntaxError 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 = {}) (8.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...
<< < ... 2 3 4 >>