るりまサーチ

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

別のキーワード

  1. net/imap data
  2. net/imap raw_data
  3. smtp data
  4. socket data
  5. net/smtp data

クラス

モジュール

キーワード

検索結果

<< < 1 2 3 >>

Net::HTTPHeader#content_type=(type) (21.0)

type と params から Content-Type: ヘッダフィールドの 値を設定します。

...re '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 = {}) (21.0)

type と params から Content-Type: ヘッダフィールドの 値を設定します。

...re '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::HTTPGenericRequest#body -> String (15.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) (15.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::HTTPHeader#content_type -> String|nil (15.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"
//}...

絞り込み条件を変える

<< < 1 2 3 >>