るりまサーチ

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

別のキーワード

  1. net/imap param
  2. win32ole win32ole_param
  3. win32ole_param new
  4. win32ole_param to_s
  5. win32ole_param optional?

ライブラリ

キーワード

検索結果

<< 1 2 3 > >>

Net::IMAP::ResponseError#response=(resp) (18107.0)

エラーとなったレスポンスを表すオブジェクトを設定します。

...エラーとなったレスポンスを表すオブジェクトを設定します。

@param resp 設定するレスポンスオブジェクト...

Net::HTTP#close_on_empty_response=(bool) (6107.0)

レスポンスがボディを持っていない場合にコネクションを 閉じるかどうかを設定します。

...レスポンスがボディを持っていない場合にコネクションを
閉じるかどうかを設定します。


@param bool レスポンスがボディを持っていない場合にコネクションを
閉じるかどうか指定します。

@see Net::HTTP#close_on_empty_re...

Net::HTTP#send_request(name, path, data = nil, header = nil) -> Net::HTTPResponse (31.0)

HTTP リクエストをサーバに送り、そのレスポンスを Net::HTTPResponse のインスタンスとして返します。

...スタンスとして返します。

@param name リクエストのメソッド名を文字列で与えます。
@param path リクエストのパスを文字列で与えます。
@param data リクエストのボディを文字列で与えます。
@param header リクエストのヘッダをハ...
...ッシュで与えます。

//emlist[例][ruby]{
response =
http.send_request('GET', '/index.html')
puts response.body
//}

@see Net::HTTP#request...

Net::HTTP#get(path, header = nil, dest = nil) -> Net::HTTPResponse (25.0)

サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。

...順次
「dest << ボディの断片」を実行します。

@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。

1.1 互換モードの...
...のボディ] となります。

//emlist[例][ruby]{
# net/http version 1.1
response, body = http.get( '/index.html' )

# net/http version 1.2
response =
http.get('/index.html')

# compatible in both version
response , = http.get('/index.html')
response.body

# compatible, using block
File.open('s...

Net::HTTP#get(path, header = nil, dest = nil) {|body_segment| .... } -> Net::HTTPResponse (25.0)

サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。

...順次
「dest << ボディの断片」を実行します。

@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。

1.1 互換モードの...
...のボディ] となります。

//emlist[例][ruby]{
# net/http version 1.1
response, body = http.get( '/index.html' )

# net/http version 1.2
response =
http.get('/index.html')

# compatible in both version
response , = http.get('/index.html')
response.body

# compatible, using block
File.open('s...

絞り込み条件を変える

Net::HTTP#head(path, header = nil) -> Net::HTTPResponse (25.0)

サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse のインスタンスを返します。

...header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけません。

@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。

1.1 互換モードの場...
...合は、レスポンスに応じて例外が発生します。

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

response = nil
Net::HTTP.start('some.www.server', 80) {|http|
response =
http.head('/index.html')
}
p response['content-type']
//}

@see Net::HTTP#request_head...

Net::HTTP#post(path, data, header = nil, dest = nil) -> Net::HTTPResponse (25.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。

...取得して順次
「dest << ボディの断片」を実行します。

@param path POST先のパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。

1.1 互換モードの場合は...
...す。

//emlist[例][ruby]{
# net/http version 1.1
response, body = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# version 1.2
response =
http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# using block
File.open('save.html', 'w') {|f|
http.post('/cgi-bin/search.rb', '...

Net::HTTP#post(path, data, header = nil, dest = nil) {|body_segment| .... } -> Net::HTTPResponse (25.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。

...取得して順次
「dest << ボディの断片」を実行します。

@param path POST先のパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。

1.1 互換モードの場合は...
...す。

//emlist[例][ruby]{
# net/http version 1.1
response, body = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# version 1.2
response =
http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# using block
File.open('save.html', 'w') {|f|
http.post('/cgi-bin/search.rb', '...

Net::HTTP#post2(path, data, header = nil) -> Net::HTTPResponse (25.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。

...Content-Type として
"application/x-www-form-urlencoded" を用います。

@param path POST先のエンティティのパスを文字列で指定します。
@param data POSTするデータを与えます。
@param header リクエストの HTTP ヘッダをハッシュで指定します。

po...
<< 1 2 3 > >>