るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

ライブラリ

キーワード

検索結果

<< 1 2 3 > >>

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

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

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

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュ...
...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...
...['content-type']
response.read_body do |str| # read body now
print str
e
nd
}
//}

get2 は時代遅れなので使わないでください。

@see Net::HTTP#get, Net::HTTPResponse#read_body...

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

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

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

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュ...
...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...
...['content-type']
response.read_body do |str| # read body now
print str
e
nd
}
//}

get2 は時代遅れなので使わないでください。

@see Net::HTTP#get, Net::HTTPResponse#read_body...

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

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

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

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシ...
...ます。このとき戻り値の
Net::HTTP
Response オブジェクトは有効な body を
持ちません。

dest は時代遅れの引数です。利用しないでください。
dest を指定した場合には
ボディを少しずつ取得して順次
「dest << ボディの断片」を実...
...します。

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

1.1 互換モードの場合は、レスポンスに応じて例外が...

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

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

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

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシ...
...ます。このとき戻り値の
Net::HTTP
Response オブジェクトは有効な body を
持ちません。

dest は時代遅れの引数です。利用しないでください。
dest を指定した場合には
ボディを少しずつ取得して順次
「dest << ボディの断片」を実...
...します。

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

1.1 互換モードの場合は、レスポンスに応じて例外が...

Net::HTTP#request_get(path, header = nil) -> Net::HTTPResponse (9219.0)

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

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

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュ...
...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...
...['content-type']
response.read_body do |str| # read body now
print str
e
nd
}
//}

get2 は時代遅れなので使わないでください。

@see Net::HTTP#get, Net::HTTPResponse#read_body...

絞り込み条件を変える

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

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

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

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュ...
...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...
...['content-type']
response.read_body do |str| # read body now
print str
e
nd
}
//}

get2 は時代遅れなので使わないでください。

@see Net::HTTP#get, Net::HTTPResponse#read_body...

Net::HTTP.get_print(host, path, port = 80) -> () (9213.0)

指定した対象から HTTP でエンティティボディを取得し、 $stdout に出力します。

...ートを整数で指定します。
@see Net::HTTP.get

=== 例

//emlist[][ruby]{
require 'net/http'
require 'uri'
Net::HTTP
.get_print URI.parse('http://www.example.com/index.html')
//}

もしくは

//emlist[][ruby]{
require 'net/http'
Net::HTTP
.get_print 'www.example.com', '/index.html'
//}...

Net::HTTP.get_print(uri) -> () (9213.0)

指定した対象から HTTP でエンティティボディを取得し、 $stdout に出力します。

...ートを整数で指定します。
@see Net::HTTP.get

=== 例

//emlist[][ruby]{
require 'net/http'
require 'uri'
Net::HTTP
.get_print URI.parse('http://www.example.com/index.html')
//}

もしくは

//emlist[][ruby]{
require 'net/http'
Net::HTTP
.get_print 'www.example.com', '/index.html'
//}...

Net::HTTP#set_debug_output(io) -> () (9207.0)

デバッグ出力の出力先を指定します。 このメソッドは深刻なセキュリティホールの原因 になるため、デバッグ以外では決して使わないでください。

...て使わないでください。

io に nil を指定するとデバッグ出力を止めます。

@param io 出力先を指定します。このオブジェクトは
メソッド << を持っている必要があります。

//emlist[例][ruby]{
http.set_debug_output($stderr)
//}...

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

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

...ィティのヘッダのみを取得します。
Net::HTTP
Response のインスタンスを返します。

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

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

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

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

@see Net::HTTP#request_head...

絞り込み条件を変える

<< 1 2 3 > >>