451件ヒット
[1-100件を表示]
(0.125秒)
種類
- インスタンスメソッド (396)
- 文書 (33)
- モジュール関数 (11)
- 特異メソッド (11)
ライブラリ
- csv (55)
-
net
/ http (341) - uri (11)
-
webrick
/ httputils (11)
クラス
- CSV (44)
-
CSV
:: FieldInfo (11) -
URI
:: MailTo (11)
モジュール
-
Net
:: HTTPHeader (341) -
WEBrick
:: HTTPUtils (11)
キーワード
- [] (11)
- []= (11)
-
basic
_ auth (11) - chunked? (11)
-
content
_ length (11) -
content
_ length= (11) -
content
_ range (11) -
content
_ type (11) -
content
_ type= (11) - convert (33)
- delete (11)
- each (11)
-
each
_ capitalized _ name (11) -
each
_ header (11) -
each
_ key (11) -
each
_ name (11) -
each
_ value (11) - fetch (33)
-
form
_ data= (11) -
get
_ fields (11) - headers (11)
- key? (11)
-
main
_ type (11) - method (11)
- new (11)
-
parse
_ header (11) -
proxy
_ basic _ auth (11) - range (11)
-
range
_ length (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) -
set
_ content _ type (11) -
set
_ form _ data (11) -
sub
_ type (11) -
type
_ params (11)
検索結果
先頭5件
-
CSV
:: FieldInfo # header -> String | nil (24361.0) -
利用可能な場合はヘッダを表す文字列を返します。
...ます。
//emlist[例][ruby]{
require 'csv'
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", headers: true)
csv.convert do |field,field_info|
p field_info.header
Date.parse(field)
end
p csv.first
# => "date1"
# => "date2"
# => #<CSV::Row "date1":#<Date: 2018-07-09 ((2458309j,0s,0n),+0s,22......99161j)> "date2":#<Date: 2018-07-10 ((2458310j,0s,0n),+0s,2299161j)>>
//}... -
WEBrick
:: HTTPUtils . # parse _ header(raw) -> Hash (18402.0) -
HTTP ヘッダをパースして結果をハッシュに格納して返します。
...HTTP ヘッダをパースして結果をハッシュに格納して返します。
@param raw 生のヘッダを表す文字列を指定します。... -
Net
:: HTTPHeader # each _ header {|name , val| . . . . } -> () (12325.0) -
保持しているヘッダ名とその値をそれぞれ ブロックに渡して呼びだします。
...mlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_header { |key,value| puts "#{key} = #{value}" }
# => accept-encoding = gzip;q=1.0,deflate;q=0.6,identity;q=0.3
# => accept = */*
# => user-agent = Ruby
//}... -
URI
:: MailTo # headers -> [[String]] (12318.0) -
自身のヘッダーを文字列の配列の配列として設定します。
...自身のヘッダーを文字列の配列の配列として設定します。
例:
require 'uri'
m = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
p m.headers #=> [["subject", "subscribe"], ["cc", "myaddr"]]... -
Net
:: HTTPHeader # content _ range -> Range|nil (9334.0) -
Content-Range: ヘッダフィールドの値を Range で返します。 Range の表わす長さは Net::HTTPHeader#range_length で得られます。
...Content-Range: ヘッダフィールドの値を Range で返します。
Range の表わす長さは Net::HTTPHeader#range_length で得られます。
ヘッダが設定されていない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.exa......mple.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_range # => nil
req['Content-Range'] = "bytes 0-499/1234"
req.content_range # => 0..499
//}... -
Net
:: HTTPHeader # range -> Range|nil (9318.0) -
Range: ヘッダの示す範囲を Range オブジェクトで返します。
...
Range: ヘッダの示す範囲を Range オブジェクトで返します。
ヘッダにない場合は nil を返します。
@raise Net::HTTPHeaderSyntaxError Range:ヘッダの中身が規格通り
でない場合に発生します。
//emlist[例 正常な......[ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['range'] = "bytes=1-5"
req.range # => [1..5]
//}
//emlist[例 Net::HTTPHeaderSyntaxError][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
re......q = Net::HTTP::Get.new(uri.request_uri)
req['range'] = "invalid"
req.range # => Net::HTTPHeaderSyntaxError
//}... -
Net
:: HTTPHeader # type _ params -> Hash (9266.0) -
Content-Type のパラメータを {"charset" => "iso-2022-jp"} という形の Hash で返します。
...-Type のパラメータを {"charset" => "iso-2022-jp"}
という形の Hash で返します。
Content-Type: ヘッダフィールドが存在しない場合には
空のハッシュを返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
r......es = Net::HTTP.get_response(uri)
res.type_params # => {"charset"=>"UTF-8"}
//}... -
Net
:: HTTPHeader # set _ form _ data(params , sep = & # 39;&& # 39;) -> () (9254.0) -
HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。
...ームのデータ params から
ヘッダフィールドとボディを設定します。
ヘッダフィールド Content-Type: には
'application/x-www-form-urlencoded' が設定されます。
@param params HTML のフォームデータの Hash を与えます。
@param sep データのセパ......rm_data][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} # => {"q"=>["ruby", "perl"], "lang"=>"en"}
//}
//emlist[例 set_form_data][ruby]{
require 'net/http'
uri = UR......I.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.set_form_data({"q" => "ruby", "lang" => "en"}, ';') # => "application/x-www-form-urlencoded"
//}... -
Net
:: HTTPHeader # range _ length -> Integer|nil (9240.0) -
Content-Range: ヘッダフィールドの表している長さを整数で返します。
...Content-Range: ヘッダフィールドの表している長さを整数で返します。
ヘッダが設定されていない場合には nil を返します。
@raise Net::HTTPHeaderSyntaxError Content-Range: ヘッダフィールド
の値が不正である......発生します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['Content-Range'] = "bytes 1-500/1000"
req.range_length # => 500
//}... -
Net
:: HTTPHeader # proxy _ basic _ auth(account , password) -> [String] (9222.0) -
Proxy 認証のために Proxy-Authorization: ヘッダをセットします。
...Proxy 認証のために Proxy-Authorization: ヘッダをセットします。
@param account アカウント名を文字列で与えます。
@param password パスワードを文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html......')
req = Net::HTTP::Get.new(uri.request_uri)
req.proxy_basic_auth("account", "password") # => ["Basic YWNjb3VudDpwYXNzd29yZA=="]
//}...