44件ヒット
[1-44件を表示]
(0.031秒)
検索結果
先頭4件
-
Net
:: HTTPGenericRequest # body=(body) (18112.0) -
サーバに送るリクエストのエンティティボディを文字列で設定します。
...。
@param body 設定するボディを文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.body = "Test Post Data" # => "Test Post Data"
//}
@see Net::HTTPGenericRequest#body... -
Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse (24.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, using block
File.open('save.txt', 'w'... -
Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (24.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, using block
File.open('save.txt', 'w'... -
Net
:: HTTPGenericRequest # body -> String (12.0) -
サーバに送るリクエストのエンティティボディを返します。
...クエストのエンティティボディを返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.body = "Test Post Data"
req.body # => "Test Post Data"
//}
@see Net::HTTPGenericRequest#body=...