るりまサーチ

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

別のキーワード

  1. uri build
  2. uri extract
  3. uri new
  4. open-uri open
  5. uri regexp

検索結果

<< 1 2 3 ... > >>

DRb::ExtServManager#uri=(uri) (24325.0)

サービス起動時にプロセスを spawn する時に渡す URI を設定します。

...サービス起動時にプロセスを spawn する時に渡す URI を設定します。

@see DRb::ExtServManager#uri...

WEBrick::HTTPResponse#request_uri=(uri) (12337.0)

リクエストの URI をセットします。 デフォルトは nil です。

...リクエストの URI をセットします。
デフォルトは nil です。

@param uri リクエストの URI URI オブジェクトで指定します。...

URI::Generic#coerce(oth) -> [URI, URI] (11251.0)

引数 oth をパースして [パース後の oth, self] の配列を返します。

...] の配列を返します。

@param oth URI オブジェクトか文字列を指定します。

例:

require 'uri'

uri =
URI.parse("http://my.example.com")
uri
.coerce("http://foo.com")
# => [#<URI::HTTP:0x00000000bcb028 URL:http://foo.com/>, #<URI::HTTP:0x00000000d92178 URL:http://my.ex...

URI::Generic#select(*components) -> [String] (11031.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"]...

OpenURI::OpenRead#read(options = {}) -> String (3031.0)

自身が表す内容を読み込んで文字列として返します。 self.open(options={}) {|io| io.read } と同じです。 このメソッドによって返される文字列は OpenURI::Meta によって extend されています。

...のメソッドによって返される文字列は OpenURI::Meta
によって extend されています。

@param options ハッシュを与えます。

require 'open-uri'
uri =
URI.parse('http://www.example.com/')
str = uri.read
p str.is_a?(OpenURI::Meta) # => true
p str.content_type...

絞り込み条件を変える

Net::HTTPHeader#fetch(key) -> String (91.0)

key ヘッダフィールドを返します。

...と発生します。

//emlist[例 key のみ指定。key が存在する][ruby]{
require 'net/http'

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

//emlist[例 key のみ指定。key が存在しない][ruby]...
...指定][ruby]{
require 'net/http'

uri =
URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "default") # => "default"
//}

//emlist[例 key とブロックを指定][ruby]{
require 'net/http'

uri =
URI.parse('http://www.example.com/i...
...ndex.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length") { |e| 99 } # => 99
//}

@see Net::HTTPHeader#[]...

Net::HTTPHeader#fetch(key) {|hash| .... } -> String (91.0)

key ヘッダフィールドを返します。

...と発生します。

//emlist[例 key のみ指定。key が存在する][ruby]{
require 'net/http'

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

//emlist[例 key のみ指定。key が存在しない][ruby]...
...指定][ruby]{
require 'net/http'

uri =
URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "default") # => "default"
//}

//emlist[例 key とブロックを指定][ruby]{
require 'net/http'

uri =
URI.parse('http://www.example.com/i...
...ndex.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length") { |e| 99 } # => 99
//}

@see Net::HTTPHeader#[]...

Net::HTTPHeader#fetch(key, default) -> String (91.0)

key ヘッダフィールドを返します。

...と発生します。

//emlist[例 key のみ指定。key が存在する][ruby]{
require 'net/http'

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

//emlist[例 key のみ指定。key が存在しない][ruby]...
...指定][ruby]{
require 'net/http'

uri =
URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "default") # => "default"
//}

//emlist[例 key とブロックを指定][ruby]{
require 'net/http'

uri =
URI.parse('http://www.example.com/i...
...ndex.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length") { |e| 99 } # => 99
//}

@see Net::HTTPHeader#[]...

Net::HTTPHeader#form_data=(params) (61.0)

HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。

...equire 'net/http'

uri =
URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} # => {"q"=>["ruby", "perl"], "lang"=>"en"}
//}

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

uri =
URI.parse('http://w...
...ww.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.set_form_data({"q" => "ruby", "lang" => "en"}, ';') # => "application/x-www-form-urlencoded"
//}...

Net::HTTPHeader#range -> Range|nil (61.0)

Range: ヘッダの示す範囲を Range オブジェクトで返します。

...

uri =
URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['range'] = "bytes=1-5"
req.range # => [1..5]
//}

//emlist[例 Net::HTTPHeaderSyntaxError][ruby]{
require 'net/http'

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

絞り込み条件を変える

<< 1 2 3 ... > >>