るりまサーチ

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

別のキーワード

  1. request new
  2. http request_put
  3. http request_get
  4. http request_post
  5. http request_head

ライブラリ

クラス

モジュール

検索結果

<< 1 2 3 ... > >>

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

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

...す。
query が nil である場合は、自身の path を返します。

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

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

ruby 1.8.3 feature (42.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

...= 2005-08-29
: Time.parse [lib] [compat]

Time.parse が小数点以下の秒も扱えるようになりました。((<ruby-talk:153859>))

$ ruby-1.8.2 -r time -e 'p Time.parse("23 Aug 2005 19:00:01.1").to_f'
1124791201.0

$ ruby-1.8.3 -r time -e 'p Time.parse("23 Aug 2005 19:00...
...] [new]
: GDBM#closed? [lib] [new]
: SDBM#closed? [lib] [new]

=== 2005-06-16

: Time.parse [lib] [compat]

うるう秒 "Fri Jan 1 08:59:60 +0900 1999" をサポートしている環境において、Time.parse
適切に振舞うようになりました。

=== 2005-06-08
: Curses.insertln...
...=== 2005-05-28
: WEBrick::CGI::Socket#request_line [lib] [compat]

WEBrick を CGI 環境下で使う場合、
request_line メソッドは REQUEST_URI ヘッダがあればそちらを優先して使うようになりました。
((<ruby-dev:26235>))

=== 2005-05-27
: mkmf [lib] [bug]
MSYS...

Net::HTTPHeader#fetch(key) -> String (36.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]{
requ...
...uby]{
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/index.html...

Net::HTTPHeader#fetch(key) {|hash| .... } -> String (36.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]{
requ...
...uby]{
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/index.html...

Net::HTTPHeader#fetch(key, default) -> String (36.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]{
requ...
...uby]{
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/index.html...

絞り込み条件を変える

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

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

...et/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://www.exampl...
...e.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 (24.0)

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

...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...

Net::HTTPHeader#set_form_data(params, sep = &#39;&&#39;) -> () (24.0)

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

...et/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://www.exampl...
...e.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::HTTPGenericRequest#method -> String (18.0)

リクエストの HTTP メソッドを文字列で返します。

...リクエストの HTTP メソッドを文字列で返します。

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

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.method # => "POST"
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"
//}...
<< 1 2 3 ... > >>