240件ヒット
[201-240件を表示]
(0.078秒)
クラス
-
JSON
:: Parser (12) -
Net
:: HTTPResponse (12) - OptionParser (144)
-
Psych
:: Nodes :: Node (12) - String (12)
モジュール
-
Net
:: HTTPExceptions (12) -
Net
:: HTTPHeader (36)
キーワード
- each (12)
-
each
_ header (12) -
each
_ value (12) - on (144)
-
parse
_ csv (12) - response (12)
- tag (12)
検索結果
先頭4件
-
Net
:: HTTPHeader # each {|name , val| . . . . } -> () (19.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=0.3
# => accept =... -
Net
:: HTTPHeader # each _ header {|name , val| . . . . } -> () (19.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=0.3
# => accept =... -
Psych
:: Nodes :: Node # tag -> String | nil (19.0) -
ノードに付加されたタグを返します。
...されていない場合は nil を返します。
ast = Psych.parse(<<EOS)
---
- !!str a
- b
EOS
p ast.root.children[0].value # => "a"
p ast.root.children[0].tag # => "tag:yaml.org,2002:str"
p ast.root.children[1].value # => "b"
p ast.root.children[1].tag # => nil... -
Net
:: HTTPExceptions # response -> Net :: HTTPResponse (13.0) -
例外の原因となったレスポンスオブジェクトを返します。
...レスポンスオブジェクトを返します。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/invalid.html"
response = Net::HTTP.get_response(URI.parse(uri))
begin
response.value
rescue => e
e.response # => #<Net::HTTPNotFound 404 Not Found readbody=true>
end
//}...