るりまサーチ

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

別のキーワード

  1. matrix index
  2. matrix find_index
  3. _builtin find_index
  4. _builtin index
  5. matrix each_with_index

ライブラリ

クラス

キーワード

検索結果

Net::HTTPGenericRequest#body=(body) (18113.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 (25.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 (25.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 (13.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=...