るりまサーチ

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

別のキーワード

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

ライブラリ

検索結果

<< < ... 2 3 4 >>

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

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

...@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 = {}) (3026.0)

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

...m 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' # =...
<< < ... 2 3 4 >>