120件ヒット
[101-120件を表示]
(0.090秒)
クラス
-
Net
:: HTTPGenericRequest (36) -
Net
:: HTTPResponse (24) - OptionParser (24)
-
URI
:: Generic (24) -
URI
:: HTTP (12)
キーワード
-
body
_ stream (12) -
body
_ stream= (12) -
program
_ name (12) -
program
_ name= (12) -
read
_ body (24) -
request
_ uri (12) - select (12)
検索結果
-
Net
:: HTTPGenericRequest # body _ stream=(f) (19.0) -
サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。
....parse('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... -
URI
:: Generic # select(*components) -> [String] (13.0) -
指定された components に対応する構成要素を文字列の配列として返します。
...字列の配列として返します。
@param components 構成要素名をシンボルで指定します。
例:
require 'uri'
uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx')
p uri.select(:userinfo, :host, :path)
# => ["myuser:mypass", "my.example.com", "/test.rbx"]...