るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

キーワード

検索結果

<< < 1 2 >>

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

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

...用します。

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

//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts respons...
...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
end
}
//}

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

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

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

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

...用します。

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

//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts respons...
...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
end
}
//}

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

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

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

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

...用します。

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

//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts respons...
...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
end
}
//}

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

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

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

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

...用します。

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

//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts respons...
...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
end
}
//}

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

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

Net::HTTP#get(path, header = nil, dest = nil) -> Net::HTTPResponse (143.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('save.txt', 'w')...
...{|f|
http.get('/~foo/', nil) do |str|
f.write str
end
}
//}

@
see Net::HTTP#request_get...

絞り込み条件を変える

Net::HTTP#get(path, header = nil, dest = nil) {|body_segment| .... } -> Net::HTTPResponse (143.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('save.txt', 'w')...
...{|f|
http.get('/~foo/', nil) do |str|
f.write str
end
}
//}

@
see Net::HTTP#request_get...
<< < 1 2 >>