るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

<< < 1 2 3 4 > >>

Net::HTTP#post(path, data, header = nil, dest = nil) -> Net::HTTPResponse (62.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。

...ティボディを少しずつ文字列として
ブロックに与えます。このとき戻り値の HTTPResponse オブジェクトは有効な body
持ちません。

POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなか...
...つ取得して順次
「dest << ボディの断片」を実行します。

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

1.1 互換モードの場合...
..., そのボディ] となります。

//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#post2(path, data, header = nil) -> Net::HTTPResponse (61.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。

...

@
param path POST先のエンティティのパスを文字列で指定します。
@
param data POSTするデータを与えます。
@
param header リクエストの HTTP ヘッダをハッシュで指定します。

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

//emlist[例][ruby...
...nse.body # body is already read

# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|
p response.status
p response['content-type']
response.read_body do |str| # read body now
print str
end
}
//}

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

Net::HTTP#post2(path, data, header = nil) {|response| .... } -> Net::HTTPResponse (61.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。

...

@
param path POST先のエンティティのパスを文字列で指定します。
@
param data POSTするデータを与えます。
@
param header リクエストの HTTP ヘッダをハッシュで指定します。

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

//emlist[例][ruby...
...nse.body # body is already read

# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|
p response.status
p response['content-type']
response.read_body do |str| # read body now
print str
end
}
//}

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

Net::HTTP#request_post(path, data, header = nil) -> Net::HTTPResponse (61.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。

...

@
param path POST先のエンティティのパスを文字列で指定します。
@
param data POSTするデータを与えます。
@
param header リクエストの HTTP ヘッダをハッシュで指定します。

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

//emlist[例][ruby...
...nse.body # body is already read

# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|
p response.status
p response['content-type']
response.read_body do |str| # read body now
print str
end
}
//}

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

Net::HTTP#request_post(path, data, header = nil) {|response| .... } -> Net::HTTPResponse (61.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。

...

@
param path POST先のエンティティのパスを文字列で指定します。
@
param data POSTするデータを与えます。
@
param header リクエストの HTTP ヘッダをハッシュで指定します。

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

//emlist[例][ruby...
...nse.body # body is already read

# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|
p response.status
p response['content-type']
response.read_body do |str| # read body now
print str
end
}
//}

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

絞り込み条件を変える

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

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

...

@
param path 取得するエンティティのパスを文字列で指定します。
@
param header リクエストの 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
end
}
//}

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

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

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

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

...

@
param path 取得するエンティティのパスを文字列で指定します。
@
param header リクエストの 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
end
}
//}

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

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

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

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

...

@
param path 取得するエンティティのパスを文字列で指定します。
@
param header リクエストの 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
end
}
//}

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

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

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

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

...

@
param path 取得するエンティティのパスを文字列で指定します。
@
param header リクエストの 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
end
}
//}

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

@
see Net::HTTP#get, Net::HTTPResponse#read_body...
<< < 1 2 3 4 > >>