るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.070秒)
トップページ > クエリ:|[x] > クエリ:-[x] > クエリ:request[x] > クエリ:post[x] > クラス:Net::HTTPGenericRequest[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

ライブラリ

キーワード

検索結果

Net::HTTPGenericRequest#body_stream -> object (3155.0)

サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。

...('http://www.example.com/index.html')
post
= Net::HTTP::Post.new(uri.request_uri)
File.open("/path/to/test", 'rb') do |f|
# 大きなファイルを扱う際にメモリ消費を少なくできる
post
.body_stream = f
post
["Content-Length"] = f.size
end
post
.body_stream # => #<File:/path/to/te...

Net::HTTPGenericRequest#body_stream=(f) (3055.0)

サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。

...('http://www.example.com/index.html')
post
= Net::HTTP::Post.new(uri.request_uri)
File.open("/path/to/test", 'rb') do |f|
# 大きなファイルを扱う際にメモリ消費を少なくできる
post
.body_stream = f
post
["Content-Length"] = f.size
end
post
.body_stream # => #<File:/path/to/te...