るりまサーチ

最速Rubyリファレンスマニュアル検索!
3455件ヒット [1-100件を表示] (0.140秒)
トップページ > クエリ:e[x] > ライブラリ:net/http[x]

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. matrix det_e
  4. matrix rank_e
  5. open3 capture2e

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Net::HTTPInternalServerError (15002.0)

HTTP レスポンス 500 (Internal Server Error) を表現するクラスです。

...HTTP レスポンス 500 (Internal Server Error) を表現するクラスです。

詳しくは 7231 Section 6.6.1 を見てください。...

Net::HTTPServerError (12002.0)

HTTP レスポンス 5xx (Server Error) を表現するクラスです。

...HTTP レスポンス 5xx (Server Error) を表現するクラスです。

サーバがエラーを起こしているなど、サーバ側で処理
を完了することができないことを表しています。...

Net::HTTPHeader#content_length=(len) (9302.0)

Content-Length: ヘッダフィールドに値を設定します。

...ntent-Length: ヘッダフィールドに値を設定します。

len に nil を与えると Content-Length: ヘッダフィールドを
削除します。

@param len 設定する値を整数で与えます。

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

uri = URI.parse('http://www.example.com/index...
....html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length # => nil
req.content_length = 10 # => 10
req.content_length # => 10
//}...

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

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

...ath にあるエンティティを取得し、
Net::HTTPResponse のインスタンスとして返します。

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシ...
...est 利用しないでください。

1.1 互換モードの場合は、レスポンスに応じて例外が発生します。
また、返り値が [レスポンスオブジェクト, そのボディ] となります。

//emlist[例][ruby]{
# net/http version 1.1
response, body = http.get( '/inde...
....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('save.txt', 'w') {|f|
http.get('/~foo/', nil) do |str|
f.write str
e
nd
}
//}

@see Net::HTTP#request_get...

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

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

...ath にあるエンティティを取得し、
Net::HTTPResponse のインスタンスとして返します。

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシ...
...est 利用しないでください。

1.1 互換モードの場合は、レスポンスに応じて例外が発生します。
また、返り値が [レスポンスオブジェクト, そのボディ] となります。

//emlist[例][ruby]{
# net/http version 1.1
response, body = http.get( '/inde...
....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('save.txt', 'w') {|f|
http.get('/~foo/', nil) do |str|
f.write str
e
nd
}
//}

@see Net::HTTP#request_get...

絞り込み条件を変える

Net::HTTP#get2(path, header = nil) -> Net::HTTPResponse (9202.0)

サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。

...th にあるエンティティを取得します。
Net::HTTPResponse オブジェクトを返します。

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュで...
...ともに呼び出されたときは、
エンティティボディをソケットから読み出す前に、
接続を維持した状態で Net::HTTPResponse
オブジェクトをブロックに渡します。
大きなサイズのボディを一度に読みだすとまずく、
小さなサイズ...
...eader リクエストの HTTP ヘッダをハッシュで指定します。

//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read

# using block
http.request_get('/index.html') {|response|
p response...

Net::HTTP#get2(path, header = nil) {|response| .... } -> Net::HTTPResponse (9202.0)

サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。

...th にあるエンティティを取得します。
Net::HTTPResponse オブジェクトを返します。

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュで...
...ともに呼び出されたときは、
エンティティボディをソケットから読み出す前に、
接続を維持した状態で Net::HTTPResponse
オブジェクトをブロックに渡します。
大きなサイズのボディを一度に読みだすとまずく、
小さなサイズ...
...eader リクエストの HTTP ヘッダをハッシュで指定します。

//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read

# using block
http.request_get('/index.html') {|response|
p response...

Net::HTTP.get_response(host, path = nil, port = nil) -> Net::HTTPResponse (9202.0)

指定した対象に GET リクエストを送り、そのレスポンスを Net::HTTPResponse として返します。

...指定した対象に GET リクエストを送り、そのレスポンスを
Net::HTTPResponse として返します。

対象の指定方法は URI で指定するか、
(host, path, port) で指定するかのいずれかです。

@param uri データの取得対象を URI で指定します。...
...@param host 接続先のホストを文字列で指定します。
@param path データの存在するパスを文字列で指定します。
@param port 接続するポートを整数で指定します。
@see Net::HTTP#get...

Net::HTTP.get_response(uri) -> Net::HTTPResponse (9202.0)

指定した対象に GET リクエストを送り、そのレスポンスを Net::HTTPResponse として返します。

...指定した対象に GET リクエストを送り、そのレスポンスを
Net::HTTPResponse として返します。

対象の指定方法は URI で指定するか、
(host, path, port) で指定するかのいずれかです。

@param uri データの取得対象を URI で指定します。...
...@param host 接続先のホストを文字列で指定します。
@param path データの存在するパスを文字列で指定します。
@param port 接続するポートを整数で指定します。
@see Net::HTTP#get...
<< 1 2 3 ... > >>