るりまサーチ

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.043秒)
トップページ > クエリ:path[x] > クエリ:require[x] > クエリ:request_uri[x]

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. rdoc/require require

ライブラリ

クラス

キーワード

検索結果

URI::HTTP#request_uri -> String (18157.0)

自身の「path + '?' + query」を文字列で返します。 query が nil である場合は、自身の path を返します。

...の「path + '?' + query」を文字列で返します。
query が nil である場合は、自身の path を返します。

path
が空である場合には、path は「'/'」であるとします。

例:
require
'uri'
u = URI.parse("http://example.com/search?q=xxx")
p u.request_uri...

Net::HTTPGenericRequest#path -> String (18135.0)

リクエストする path を文字列で返します。

...リクエストする path を文字列で返します。

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

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

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

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

...を得るストリームオブジェクトを与えます。

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

uri = URI.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/to/test (closed)>
//}...

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

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

...を得るストリームオブジェクトを与えます。

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

uri = URI.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/to/test (closed)>
//}...