るりまサーチ

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

別のキーワード

  1. new openssl::bn
  2. new openssl::asn1::asn1data
  3. new openssl::pkey::ec::group
  4. new openssl::x509::certificate
  5. start net::smtp

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 > >>

Net::HTTP::Post (23000.0)

HTTP の POST リクエストを表すクラスです。

HTTP の POST リクエストを表すクラスです。

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

Net::HTTPGenericRequest#body=(body) (6.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 (6.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|
# 大きなファイルを扱う際にメモリ消費を少なくできる
po...

Net::HTTPGenericRequest#body_stream=(f) (6.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|
# 大きなファイルを扱う際にメモリ消費を少なくできる
po...

絞り込み条件を変える

Net::HTTPGenericRequest#method -> String (6.0)

リクエストの HTTP メソッドを文字列で返します。

...リクエストの HTTP メソッドを文字列で返します。

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

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.method # => "POST"
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"
//}...

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

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

...ST など)の場合真を返します。

//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_permitted? # =...

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

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

...ST など)の場合真を返します。

//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_permitted? #...

Net::HTTPHeader#content_type -> String|nil (6.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::HTTPRequest (6.0)

HTTP リクエストを抽象化するクラスです。

...るクラスです。

Net::HTTPRequest は抽象クラスなので実際にはサブクラスの

* Net::HTTP::Get
* Net::HTTP::Head
* Net::HTTP::Post
* Net::HTTP::Put
* Net::HTTP::Copy
* Net::HTTP::Delete
* Net::HTTP::Lock
* Net::HTTP::Mkcol
* Net::HTTP::Move
* Net::HTTP::Optio...

絞り込み条件を変える

<< 1 2 > >>