168件ヒット
[1-100件を表示]
(0.020秒)
種類
- インスタンスメソッド (132)
- クラス (24)
- 特異メソッド (12)
クラス
-
Net
:: HTTP (84)
モジュール
-
Net
:: HTTPHeader (60)
キーワード
- HTTPInformation (12)
- HTTPNonAuthoritativeInformation (12)
-
content
_ type (12) -
content
_ type= (12) -
form
_ data= (12) - post (24)
- post2 (24)
-
post
_ form (12) -
request
_ post (24) -
set
_ content _ type (12) -
set
_ form _ data (12)
検索結果
先頭5件
-
Net
:: HTTPHeader # form _ data=(params) (6140.0) -
HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。
...t-Type: には
'application/x-www-form-urlencoded' が設定されます。
@param params HTML のフォームデータの Hash を与えます。
@param sep データのセパレータを文字列で与えます。
//emlist[例 form_data][ruby]{
require 'net/http'
uri = URI.parse('http://www.exa.......request_uri)
req.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} # => {"q"=>["ruby", "perl"], "lang"=>"en"}
//}
//emlist[例 set_form_data][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.set_form_data({"q" => "rub......y", "lang" => "en"}, ';') # => "application/x-www-form-urlencoded"
//}... -
Net
:: HTTPHeader # set _ form _ data(params , sep = & # 39;&& # 39;) -> () (6140.0) -
HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。
...t-Type: には
'application/x-www-form-urlencoded' が設定されます。
@param params HTML のフォームデータの Hash を与えます。
@param sep データのセパレータを文字列で与えます。
//emlist[例 form_data][ruby]{
require 'net/http'
uri = URI.parse('http://www.exa.......request_uri)
req.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} # => {"q"=>["ruby", "perl"], "lang"=>"en"}
//}
//emlist[例 set_form_data][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.set_form_data({"q" => "rub......y", "lang" => "en"}, ';') # => "application/x-www-form-urlencoded"
//}... -
Net
:: HTTP . post _ form(uri , params) -> Net :: HTTPResponse (6103.0) -
URI で指定した対象に フォームのデータを HTTP で POST します。
URI で指定した対象に フォームのデータを HTTP で
POST します。
送るデータは params に文字列から文字列への Hash として
渡します。
@param uri POST する対象を URI で指定します。
@param params POST するデータです。 -
Net
:: HTTPInformation (6002.0) -
HTTP レスポンス 1xx (Informational) を表現するクラスです。
...HTTP レスポンス 1xx (Informational) を表現するクラスです。
リクエストが正常に受信し、処理を続けていることを表わして
います。... -
Net
:: HTTPNonAuthoritativeInformation (6002.0) -
HTTP レスポンス 203 (Non-Authoritative Information) を表現するクラスです。
...HTTP レスポンス 203 (Non-Authoritative Information) を表現するクラスです。
詳しくは 7231 Section 6.3.4 を見てください。... -
Net
:: HTTPHeader # content _ type=(type) (20.0) -
type と params から Content-Type: ヘッダフィールドの 値を設定します。
...uire 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data' # => "multipart/form-data"
req.content_type # => "multipart/form-data"... -
Net
:: HTTPHeader # set _ content _ type(type , params = {}) (20.0) -
type と params から Content-Type: ヘッダフィールドの 値を設定します。
...uire 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data' # => "multipart/form-data"
req.content_type # => "multipart/form-data"... -
Net
:: HTTPHeader # content _ type -> String|nil (14.0) -
"text/html" のような Content-Type を表す 文字列を返します。
...は nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/comments.cgi?post=comment')
req = Net::HTTP::Post.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data'
req.content_type # => "multipart/form-data"
//}... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse (8.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
dest は時代遅れの引数です。利用しないでください。
dest を指定した場合には
ボディ......例外が発生します。
また、返り値が [レスポンスオブジェクト, そのボディ] となります。
//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...