るりまサーチ

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

別のキーワード

  1. erb u
  2. util u
  3. matrix u
  4. _builtin koi8_u
  5. encoding koi8_u

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 > >>

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

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

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

@
see DRb::ExtServManager#uri...

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

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

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

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

Net::HTTPResponse#value -> nil (6137.0)

レスポンスが 2xx(成功)でなかった場合に、対応する 例外を発生させます。

...を発生させます。

@
raise HTTPError レスポンスが 1xx であるか、 net/http が知らない
種類のレスポンスである場合に発生します。
@
raise HTTPRetriableError レスポンスが 3xx である場合に発生します。
@
raise HTTPServerException...
...発生します。
@
raise HTTPFatalError レスポンスが 5xx である場合に発生します。

//emlist[例 レスポンスが 2xx(成功)][ruby]{
require 'net/http'

uri =
"http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.value # => nil
//}

//eml...
...ist[例 レスポンスが 2xx以外][ruby]{
require 'net/http'

uri =
"http://www.example.com/invalid.html"
response = Net::HTTP.get_response(URI.parse(uri))
begin
response.value
rescue => e
e.class # => Net::HTTPServerException
e.message # => 404 "Not Found"
end
//}...

Net::HTTPHeader#basic_auth(account, password) -> [String] (6119.0)

Authorization: ヘッダを BASIC 認証用にセットします。

...Authorization: ヘッダを BASIC 認証用にセットします。

@
param account アカウント名を文字列で与えます。
@
param password パスワードを文字列で与えます。

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

uri =
URI.parse('http://www.example.com/index.html')
req = Net:...
...:HTTP::Get.new(uri.request_uri)
req.basic_auth("user", "pass") # => ["Basic dXNlcjpwYXNz"]
//}...

Net::HTTPHeader#proxy_basic_auth(account, password) -> [String] (6119.0)

Proxy 認証のために Proxy-Authorization: ヘッダをセットします。

...-Authorization: ヘッダをセットします。

@
param account アカウント名を文字列で与えます。
@
param password パスワードを文字列で与えます。

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

uri =
URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri...
....request_uri)
req.proxy_basic_auth("account", "password") # => ["Basic YWNjb3VudDpwYXNzd29yZA=="]
//}...

絞り込み条件を変える

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

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

...列を返します。

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

例:

require 'uri'

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

Net::HTTPGenericRequest#body=(body) (3019.0)

サーバに送るリクエストのエンティティボディを文字列で設定します。

...す。

@
param body 設定するボディを文字列で与えます。

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

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

@
see Net::HTTPGenericRequest#body...

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

Net::HTTPGenericRequest#body -> String (3013.0)

サーバに送るリクエストのエンティティボディを返します。

...クエストのエンティティボディを返します。

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

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

@
see Net::HTTPGenericRequest#body=...

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

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

...る必要があります。

@
param f エンティティボディのデータを得るストリームオブジェクトを与えます。

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

絞り込み条件を変える

<< 1 2 > >>