るりまサーチ

最速Rubyリファレンスマニュアル検索!
108件ヒット [101-108件を表示] (0.025秒)
トップページ > クエリ:Set[x] > モジュール:Net::HTTPHeader[x]

別のキーワード

  1. stringio set_encoding
  2. _builtin set_encoding
  3. tracer set_get_line_procs
  4. set new
  5. openssl set

ライブラリ

キーワード

検索結果

<< < 1 2 >>

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

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

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

@param type メディアタイプを文字列で指定します。
@param params パラメータ属性をハッシュで指定します。

//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 # => ni...
<< < 1 2 >>