567件ヒット
[1-100件を表示]
(0.027秒)
別のキーワード
ライブラリ
- ビルトイン (30)
-
net
/ http (240) - openssl (24)
-
webrick
/ httpresponse (156) -
webrick
/ httpservlet / abstract (72)
クラス
-
Net
:: HTTP (12) -
Net
:: HTTPGenericRequest (12) -
Net
:: HTTPResponse (144) - Object (30)
-
WEBrick
:: HTTPResponse (156) -
WEBrick
:: HTTPServlet :: AbstractServlet (72)
モジュール
-
Net
:: HTTPExceptions (12) -
Net
:: HTTPHeader (60) -
OpenSSL
:: OCSP (12)
キーワード
-
CODE
_ CLASS _ TO _ OBJ (12) -
CODE
_ TO _ OBJ (12) - OCSP (12)
-
RESPONSE
_ STATUS _ SIGREQUIRED (12) - []= (12)
- body (12)
- body= (12)
-
body
_ permitted? (12) - chunked= (12)
- code (12)
-
content
_ length (12) -
content
_ length= (12) -
do
_ DELETE (12) -
do
_ GET (12) -
do
_ HEAD (12) -
do
_ OPTIONS (12) -
do
_ POST (12) -
do
_ PUT (12) - entity (12)
-
get
_ fields (12) - head (12)
-
http
_ version (24) - key? (12)
-
main
_ type (12) - msg (12)
-
net
/ http (12) -
net
/ imap (12) - new (12)
-
read
_ body (24) -
reason
_ phrase= (12) -
response
_ body _ permitted? (12) -
ruby 1
. 9 feature (12) -
set
_ redirect (12) - status= (12)
-
status
_ line (12) -
sub
_ type (12) - then (14)
-
to
_ s (12) -
type
_ params (12) - value (12)
-
yield
_ self (16) - 制御構造 (9)
検索結果
先頭5件
-
Net
:: HTTPExceptions # response -> Net :: HTTPResponse (18231.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
//}... -
OpenSSL
:: OCSP :: RESPONSE _ STATUS _ SIGREQUIRED -> Integer (12217.0) -
OpenSSL::OCSP::Response#status のステータスコードで 、 サーバがクライアントにリクエストへの署名を要求していることを意味します。
...OpenSSL::OCSP::Response#status のステータスコードで 、
サーバがクライアントにリクエストへの署名を要求していることを意味します。
詳しくは 2560 2.3 を見てください。... -
Net
:: HTTPGenericRequest # response _ body _ permitted? -> bool (6119.0) -
サーバからのレスポンスにエンティティボディを含むことが許されている HTTP メソッド (GET, POST など)の場合真を返します。
...合真を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
post.response_body_permitted? # => true
head = Net::HTTP::Head.new(uri.request_uri)
head.response_body_permitted? # => false
//}... -
WEBrick
:: HTTPResponse . new(config) -> WEBrick :: HTTPResponse (3106.0) -
HTTPResponse オブジェクトを生成して返します。
...HTTPResponse オブジェクトを生成して返します。
@param config 設定を保存したハッシュを指定します。:HTTPVersion は必須です。
require 'webrick'
res = WEBrick::HTTPResponse.new( { :HTTPVersion => "1.1" } )... -
Net
:: HTTPResponse # value -> nil (3048.0) -
レスポンスが 2xx(成功)でなかった場合に、対応する 例外を発生させます。
...ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.value # => nil
//}
//emlist[例 レスポンスが 2xx以外][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.class # => Net::HTTPServerException
e.message # => 404 "Not Found"
end
//}... -
Net
:: HTTPResponse # read _ body {|str| . . . . } -> () (3042.0) -
ブロックを与えなかった場合にはエンティティボディを 文字列で返します。 ブロックを与えた場合には エンティティボディを少しずつ取得して順次ブロックに 文字列で与えます。
...度に結果取得][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.read_body[0..10] # => "<!doctype h"
//}
//emlist[例2 ブロックを与えて大きいファイルを取得][ruby]{
require 'net/http'
uri = URI.pars......e.open("/path/to/big.file", "w") do |f|
# Net::HTTP#request_get と Net::HTTPResponse#read_body で少しずつ読み書き。メモリ消費が少ない。
http.request_get(uri.path) do |response|
response.read_body do |s|
f.write(s)
end
end
end
end
//}
一度ブ... -
Net
:: HTTPResponse # read _ body(dest=nil) -> String|nil (3042.0) -
ブロックを与えなかった場合にはエンティティボディを 文字列で返します。 ブロックを与えた場合には エンティティボディを少しずつ取得して順次ブロックに 文字列で与えます。
...度に結果取得][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.read_body[0..10] # => "<!doctype h"
//}
//emlist[例2 ブロックを与えて大きいファイルを取得][ruby]{
require 'net/http'
uri = URI.pars......e.open("/path/to/big.file", "w") do |f|
# Net::HTTP#request_get と Net::HTTPResponse#read_body で少しずつ読み書き。メモリ消費が少ない。
http.request_get(uri.path) do |response|
response.read_body do |s|
f.write(s)
end
end
end
end
//}
一度ブ... -
Net
:: HTTPResponse # body -> String | () | nil (3024.0) -
エンティティボディを返します。
...返します。
Net::HTTPResponse#read_body をブロック付きで呼んだ場合には
このメソッドはNet::ReadAdapter のインスタンスを返しますが、
これは使わないでください。
entity は obsolete です。
//emlist[例][ruby]{
require 'net/http'
uri = "http://w......ww.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.body[0..10] # => "<!doctype h"
//}... -
Net
:: HTTPResponse # code -> String (3024.0) -
HTTP のリザルトコードです。例えば '302' などです。
...スオブジェクトがどのクラスのインスタンスかを
見ることでもレスポンスの種類を判別できます。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.code # => "200"
//}...