60件ヒット
[1-60件を表示]
(0.032秒)
別のキーワード
クラス
-
Net
:: HTTP (48) -
Net
:: HTTPResponse (12)
キーワード
- get (24)
-
http
_ version (12) - post (24)
検索結果
先頭5件
- Net
:: HTTPResponse # http _ version -> String - Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse - Net
:: HTTP # post(path , data , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse - Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse - Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse
-
Net
:: HTTPResponse # http _ version -> String (6122.0) -
サーバがサポートしている HTTP のバージョンを文字列で返します。
...サーバがサポートしている HTTP のバージョンを文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.http_version # => "1.1"
//}... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse (63.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
..., そのボディ] となります。
//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|
ht... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (63.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
..., そのボディ] となります。
//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|
ht... -
Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse (33.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...ブジェクト, そのボディ] となります。
//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, usin... -
Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (33.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...ブジェクト, そのボディ] となります。
//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, usin...