84件ヒット
[1-84件を表示]
(0.088秒)
クラス
-
Net
:: HTTPGenericRequest (36) -
URI
:: Generic (48)
キーワード
-
body
_ stream (12) -
body
_ stream= (12) - hierarchical? (12)
- path= (12)
- select (12)
検索結果
先頭5件
-
URI
:: Generic # path -> String | nil (21148.0) -
自身の path を文字列で返します。設定されていない場合は nil を返します。
...自身の path を文字列で返します。設定されていない場合は nil を返します。
require 'uri'
p URI.parse('http://example.com/hoge').path #=> "/hoge"
p URI.parse('http://example.com').path #=> ""
p URI.parse('mailto:nospam@localhost').path #=> n......il
p URI('ftp://example.com/foo').path #=> 'foo'
p URI('ftp://example.com/%2Ffoo').path #=> '/foo'... -
Net
:: HTTPGenericRequest # path -> String (21124.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"
//}... -
URI
:: Generic # path=(s) (9130.0) -
自身の path を設定します。
...自身の path を設定します。
@param s 自身の path を表す文字列を指定します。
@raise URI::InvalidComponentError 不正な引数 s に対して発生します。
@raise URI::InvalidURIError opaque と path を同時に設定した場合に発生します。... -
URI
:: Generic # hierarchical? -> bool (3017.0) -
自身に path が設定されているなら true を返します。そうでない場合は false を返します。
...自身に path が設定されているなら true を返します。そうでない場合は false を返します。... -
Net
:: HTTPGenericRequest # body _ stream -> object (3013.0) -
サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。
...e.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) (3013.0) -
サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。
...e.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)>
//}... -
URI
:: Generic # select(*components) -> [String] (3007.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"]...