るりまサーチ

最速Rubyリファレンスマニュアル検索!
444件ヒット [1-100件を表示] (0.046秒)
トップページ > クエリ:b[x] > クエリ:post[x]

別のキーワード

  1. string b
  2. _builtin b
  3. b
  4. b string
  5. b _builtin

検索結果

<< 1 2 3 ... > >>

Net::HTTP#post(path, data, header = nil, dest = nil) {|body_segment| .... } -> Net::HTTPResponse (18254.0)

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

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

返り値は Net::HTTPResponse のインスタンスです。

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

POST
する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlen...
...by]{
# 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|
http.post('/cgi-bin/search.rb', 'query=subject&target=rub...

WEBrick::HTTPServlet::FileHandler#do_POST(request, response) -> () (9117.0)

POST リクエストを処理します。

...
POST
リクエストを処理します。

@param request クライアントからのリクエストを表す WEBrick::HTTPRequest オブジェクトです。

@param response クライアントへのレスポンスを表す WEBrick::HTTPResponse オブジェクトです。

@raise WEBrick::HTTPSta...

Net::HTTPGenericRequest#request_body_permitted? -> bool (6234.0)

リクエストにエンティティボディを一緒に送ることが許されている HTTP メソッド (POST など)の場合真を返します。

...ッド (POST など)の場合真を返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
post
= Net::HTTP::Post.new(uri.request_uri)
post
.request_body_permitted? # => true

head = Net::HTTP::Head.new(uri.request_uri)
head.request_body_permit...

Net::HTTPGenericRequest#response_body_permitted? -> bool (6234.0)

サーバからのレスポンスにエンティティボディを含むことが許されている HTTP メソッド (GET, POST など)の場合真を返します。

...(GET, POST など)の場合真を返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
post
= Net::HTTP::Post.new(uri.request_uri)
post
.response_body_permitted? # => true

head = Net::HTTP::Head.new(uri.request_uri)
head.response_body_permi...

Net::HTTPGenericRequest#body=(body) (6218.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::HTTPGenericRequest#body_stream -> object (6130.0)

サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。

...//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
post
= Net::HTTP::Post.new(uri.request_uri)
File.open("/path/to/test", 'rb') do |f|
# 大きなファイルを扱う際にメモリ消費を少なくできる
post
.body_stream = f
post
["Content-Length...
..."] = f.size
end
post.body_stream # => #<File:/path/to/test (closed)>
//}...

Net::HTTPGenericRequest#body_stream=(f) (6130.0)

サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。

...//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
post
= Net::HTTP::Post.new(uri.request_uri)
File.open("/path/to/test", 'rb') do |f|
# 大きなファイルを扱う際にメモリ消費を少なくできる
post
.body_stream = f
post
["Content-Length...
..."] = f.size
end
post.body_stream # => #<File:/path/to/test (closed)>
//}...

Net::HTTPGenericRequest#body -> String (6118.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=...

WEBrick::HTTPServlet::CGIHandler#do_POST(request, response) -> () (6117.0)

GET, POST リクエストを処理します。

...GET, POST リクエストを処理します。

@param request WEBrick::HTTPRequest のインスタンスを指定します。

@param response WEBrick::HTTPResponse のインスタンスを指定します。...
<< 1 2 3 ... > >>