るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.011秒)
トップページ > クエリ:type=[x] > ライブラリ:net/http[x]

別のキーワード

  1. rexml/document node_type
  2. win32ole ole_type
  3. rss type=
  4. rss type
  5. net/imap media_type

モジュール

キーワード

検索結果

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

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

...ッシュで指定します。

//emlist[例][ruby]{
require '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_...

Net::HTTPHeader#set_content_type(type, params = {}) (3008.0)

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

...ッシュで指定します。

//emlist[例][ruby]{
require '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_...

Net::HTTPHeader#content_type -> String|nil (8.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...