るりまサーチ

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

別のキーワード

  1. net/imap param
  2. win32ole win32ole_param
  3. bodytypetext param
  4. bodytypebasic param
  5. win32ole_param output?

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Net::HTTP#head(path, header = nil) -> Net::HTTPResponse (18232.0)

サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse のインスタンスを返します。

...ンスタンスを返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけません。

@param path 取得するエンティテ...
...@param header リクエストの HTTP ヘッダをハッシュで指定します。

1.1 互換モードの場合は、レスポンスに応じて例外が発生します。

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

response = nil
Net::HTTP.start('some.www.server', 80) {|http|
response = http.head...
...('/index.html')
}
p response['content-type']
//}

@see Net::HTTP#request_head...

Net::HTTPHeader#type_params -> Hash (9107.0)

Content-Type のパラメータを {"charset" => "iso-2022-jp"} という形の Hash で返します。

...返します。

Content-Type: ヘッダフィールドが存在しない場合には
空のハッシュを返します。

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

uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.type_params # => {"charset"=>"UTF-8"}
//}...

Net::HTTP#head2(path, header = nil) -> Net::HTTPResponse (6241.0)

サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。

...ダのみを取得します。
Net::HTTPResponse オブジェクトを返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま...
...せん。

@param path ヘッダを取得するエンティティのパスを
文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。


head
2 は時代遅れなので使わないでください。

//emlist[例][ruby]{
response =...
...http.request_head('/index.html')
p response['content-type']
//}

@see Net::HTTP#head...

Net::HTTP#head2(path, header = nil) {|response| .... } -> Net::HTTPResponse (6241.0)

サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。

...ダのみを取得します。
Net::HTTPResponse オブジェクトを返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま...
...せん。

@param path ヘッダを取得するエンティティのパスを
文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。


head
2 は時代遅れなので使わないでください。

//emlist[例][ruby]{
response =...
...http.request_head('/index.html')
p response['content-type']
//}

@see Net::HTTP#head...

Net::HTTP#request_head(path, header = nil) -> Net::HTTPResponse (6241.0)

サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。

...ダのみを取得します。
Net::HTTPResponse オブジェクトを返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま...
...せん。

@param path ヘッダを取得するエンティティのパスを
文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。


head
2 は時代遅れなので使わないでください。

//emlist[例][ruby]{
response =...
...http.request_head('/index.html')
p response['content-type']
//}

@see Net::HTTP#head...

絞り込み条件を変える

Net::HTTP#request_head(path, header = nil) {|response| .... } -> Net::HTTPResponse (6241.0)

サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。

...ダのみを取得します。
Net::HTTPResponse オブジェクトを返します。

head
er が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま...
...せん。

@param path ヘッダを取得するエンティティのパスを
文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。


head
2 は時代遅れなので使わないでください。

//emlist[例][ruby]{
response =...
...http.request_head('/index.html')
p response['content-type']
//}

@see Net::HTTP#head...

OptionParser#on_head(*arg, &block) -> self (6126.0)

オプションを取り扱うためのブロックを自身の持つリストの最初に登録します。

...自身の持つリストの最初に登録します。

@param arg OptionParser#on と同様です。

@param block OptionParser#on と同様です。

//emlist[例][ruby]{
require "optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail...

CGI#header(options = "text/html") -> String (6125.0)

HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。

...06 Variant Also Negotiates"

@param options Hash か文字列で HTTP ヘッダを生成するための情報を指定します。

例:
head
er
# Content-Type: text/html

head
er("text/plain")
# Content-Type: text/plain

head
er({"nph" => true,...
...e1, cookie2],
"my_header1" => "my_value",
"my_header2" => "my_value"})

例:
cgi = CGI.new('html3')
print cgi.header({"charset" => "shift_jis", "status" => "OK"})
print "<html><head><title>TITLE</title></head>\r\n"
print "<body>BODY</...

CSV#header_convert {|field, field_info| ... } (6119.0)

CSV#convert に似ていますが、ヘッダ行用のメソッドです。

...ん。

@param name 変換器の名前を指定します。

//emlist[例 name を指定][ruby]{
require "csv"

csv = CSV.new("header1,header2\nrow1_1,row1_2", headers: true)
csv.header_convert(:symbol)
csv.first.headers # => [:header1, :header2]
//}

//emlist[例 ブロックを指定][ruby]{
requi...
...re "csv"

csv = CSV.new("header1,header2\nrow1_1,row1_2", headers: true)
csv.header_convert do |field|
field.to_sym
end
csv.first.headers # => [:header1, :header2]
//}

@see CSV#header_converters, CSV#convert...
<< 1 2 3 ... > >>