別のキーワード
クラス
- CGI (12)
- CSV (36)
-
CSV
:: Row (96) -
CSV
:: Table (24) -
Net
:: HTTP (216) - OptionParser (120)
モジュール
-
Net
:: HTTPHeader (264)
キーワード
- [] (36)
- []= (48)
-
add
_ field (12) -
basic
_ auth (12) -
content
_ length= (12) -
content
_ type= (12) - delete (24)
- fetch (36)
- field (12)
-
form
_ data= (12) - get (24)
- get2 (24)
-
get
_ fields (12) - head2 (24)
- header (12)
- header? (12)
-
header
_ convert (36) - include? (12)
- index (12)
- key? (12)
-
on
_ head (12) -
on
_ tail (12) - parse (24)
- parse! (12)
- post (24)
- post2 (24)
-
proxy
_ basic _ auth (12) - range= (24)
-
request
_ get (24) -
request
_ head (24) -
request
_ post (24) -
send
_ request (12) -
set
_ content _ type (12) -
set
_ form _ data (12) -
set
_ range (36) - summarize (24)
-
summary
_ indent= (12) -
summary
_ width= (12) -
type
_ params (12)
検索結果
先頭5件
-
Net
:: HTTP # head(path , header = nil) -> Net :: HTTPResponse (18232.0) -
サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse のインスタンスを返します。
...ンスタンスを返します。
header が 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 オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま......せん。
@param path ヘッダを取得するエンティティのパスを
文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
head2 は時代遅れなので使わないでください。
//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 オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま......せん。
@param path ヘッダを取得するエンティティのパスを
文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
head2 は時代遅れなので使わないでください。
//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 オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま......せん。
@param path ヘッダを取得するエンティティのパスを
文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
head2 は時代遅れなので使わないでください。
//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 オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけま......せん。
@param path ヘッダを取得するエンティティのパスを
文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
head2 は時代遅れなので使わないでください。
//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 ヘッダを生成するための情報を指定します。
例:
header
# Content-Type: text/html
header("text/plain")
# Content-Type: text/plain
header({"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...