407件ヒット
[1-100件を表示]
(0.081秒)
クラス
- CSV (33)
-
CSV
:: FieldInfo (11) -
URI
:: MailTo (22)
モジュール
-
Net
:: HTTPHeader (341)
キーワード
- [] (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)
- headers= (11)
- key? (11)
-
main
_ type (11) - method (11)
-
proxy
_ basic _ auth (11) - range (11)
-
range
_ length (11) -
set
_ content _ type (11) -
set
_ form _ data (11) -
sub
_ type (11) -
type
_ params (11)
検索結果
先頭5件
-
CSV
:: FieldInfo # header -> String | nil (18114.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,0... -
Net
:: HTTPHeader # each _ header {|name , val| . . . . } -> () (6114.0) -
保持しているヘッダ名とその値をそれぞれ ブロックに渡して呼びだします。
...文字列がブロックに渡されます。
//emlist[例][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=... -
URI
:: MailTo # headers -> [[String]] (6107.0) -
自身のヘッダーを文字列の配列の配列として設定します。
...自身のヘッダーを文字列の配列の配列として設定します。
例:
require 'uri'
m = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
p m.headers #=> [["subject", "subscribe"], ["cc", "myaddr"]]... -
URI
:: MailTo # headers=(s) (6107.0) -
自身のヘッダーを文字列で設定します。
...を文字列で設定します。
@param s ヘッダーを表す文字列を指定します。
@raise URI::InvalidComponentError 不正な引数 s に対して発生します。
例:
require 'uri'
m = URI.parse("mailto:nospam@example.com")
m.headers = URI.escape("subject=hello hello")... -
Net
:: HTTPHeader # each _ capitalized _ name {|name| . . . . } -> () (3039.0) -
保持しているヘッダ名を正規化 ('x-my-header' -> 'X-My-Header') して、ブロックに渡します。
...保持しているヘッダ名を正規化
('x-my-header' -> 'X-My-Header')
して、ブロックに渡します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_capitalized_name { |key| puts key }... -
Net
:: HTTPHeader # fetch(key) -> String (3019.0) -
key ヘッダフィールドを返します。
...、キーの探索に 失敗すると発生します。
//emlist[例 key のみ指定。key が存在する][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("user-agent") # => "Ruby"
//}
//emlist[例 key のみ指......uby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "default") # => "default"
//}
//emlist[例 key とブロックを指定][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html......')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length") { |e| 99 } # => 99
//}
@see Net::HTTPHeader#[]... -
Net
:: HTTPHeader # fetch(key) {|hash| . . . . } -> String (3019.0) -
key ヘッダフィールドを返します。
...、キーの探索に 失敗すると発生します。
//emlist[例 key のみ指定。key が存在する][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("user-agent") # => "Ruby"
//}
//emlist[例 key のみ指......uby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "default") # => "default"
//}
//emlist[例 key とブロックを指定][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html......')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length") { |e| 99 } # => 99
//}
@see Net::HTTPHeader#[]... -
Net
:: HTTPHeader # fetch(key , default) -> String (3019.0) -
key ヘッダフィールドを返します。
...、キーの探索に 失敗すると発生します。
//emlist[例 key のみ指定。key が存在する][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("user-agent") # => "Ruby"
//}
//emlist[例 key のみ指......uby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "default") # => "default"
//}
//emlist[例 key とブロックを指定][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html......')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length") { |e| 99 } # => 99
//}
@see Net::HTTPHeader#[]... -
Net
:: HTTPHeader # each {|name , val| . . . . } -> () (3014.0) -
保持しているヘッダ名とその値をそれぞれ ブロックに渡して呼びだします。
...文字列がブロックに渡されます。
//emlist[例][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=... -
Net
:: HTTPHeader # form _ data=(params) (3013.0) -
HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。
...et/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 = URI.parse('http://www.exampl...