1783件ヒット
[1701-1783件を表示]
(0.063秒)
別のキーワード
クラス
-
Net
:: HTTP (1090) -
Net
:: HTTPGenericRequest (99) -
Net
:: HTTPResponse (132)
モジュール
-
Net
:: HTTPExceptions (11) -
Net
:: HTTPHeader (451)
キーワード
- [] (11)
- []= (11)
- active? (11)
-
add
_ field (11) - address (11)
-
basic
_ auth (11) - body (22)
- body= (11)
-
body
_ exist? (11) -
body
_ stream (11) -
body
_ stream= (11) -
ca
_ file (11) -
ca
_ file= (11) -
ca
_ path (11) -
ca
_ path= (11) -
canonical
_ each (11) - cert (11)
- cert= (11)
-
cert
_ store (11) -
cert
_ store= (11) - chunked? (11)
- ciphers (11)
- ciphers= (11)
-
close
_ on _ empty _ response (11) -
close
_ on _ empty _ response= (11) - code (11)
-
content
_ length (11) -
content
_ length= (11) -
content
_ range (11) -
content
_ type (11) -
content
_ type= (11) -
continue
_ timeout (11) -
continue
_ timeout= (11) - copy (11)
- delete (22)
- each (11)
-
each
_ capitalized (11) -
each
_ capitalized _ name (11) -
each
_ header (11) -
each
_ key (11) -
each
_ name (11) -
each
_ value (11) - entity (11)
- fetch (33)
- finish (11)
-
form
_ data= (11) - get (22)
- get2 (22)
-
get
_ fields (11) - head (11)
- head2 (22)
- header (11)
-
http
_ version (11) -
keep
_ alive _ timeout (11) -
keep
_ alive _ timeout= (11) - key (11)
- key= (11)
- key? (11)
- length (11)
-
local
_ host (11) -
local
_ host= (11) -
local
_ port (11) -
local
_ port= (11) - lock (11)
-
main
_ type (11) - method (22)
- mkcol (11)
- move (11)
- msg (11)
-
open
_ timeout (11) -
open
_ timeout= (11) - patch (22)
- path (11)
-
peer
_ cert (11) - port (11)
- post (22)
- post2 (22)
- propfind (11)
- proppatch (11)
- proxy? (11)
-
proxy
_ address (11) -
proxy
_ address= (11) -
proxy
_ basic _ auth (11) -
proxy
_ from _ env= (11) -
proxy
_ from _ env? (11) -
proxy
_ pass (11) -
proxy
_ pass= (11) -
proxy
_ port (11) -
proxy
_ port= (11) -
proxy
_ uri (11) -
proxy
_ user (11) -
proxy
_ user= (11) - proxyaddr (11)
- proxyport (11)
- put (11)
- put2 (22)
- range (11)
- range= (22)
-
range
_ length (11) -
read
_ body (22) -
read
_ timeout (11) -
read
_ timeout= (11) -
reader
_ header (11) - request (22)
-
request
_ body _ permitted? (11) -
request
_ get (22) -
request
_ head (22) -
request
_ post (22) -
request
_ put (22) - response (22)
-
response
_ body _ permitted? (11) -
send
_ request (11) -
set
_ content _ type (11) -
set
_ debug _ output (11) -
set
_ form _ data (11) -
set
_ range (33) - size (11)
-
ssl
_ timeout (11) -
ssl
_ timeout= (11) -
ssl
_ version (11) -
ssl
_ version= (11) - start (22)
- started? (11)
-
sub
_ type (11) - trace (11)
-
type
_ params (11) - unlock (11)
-
use
_ ssl= (11) -
use
_ ssl? (11) - value (11)
-
verify
_ callback (11) -
verify
_ callback= (11) -
verify
_ depth (11) -
verify
_ depth= (11) -
verify
_ mode (11) -
verify
_ mode= (11) -
write
_ timeout (6) -
write
_ timeout= (6)
検索結果
先頭5件
-
Net
:: HTTPResponse # entity -> String | () | nil (3003.0) -
エンティティボディを返します。
...Net::HTTPResponse#read_body をブロック付きで呼んだ場合には
このメソッドはNet::ReadAdapter のインスタンスを返しますが、
これは使わないでください。
entity は obsolete です。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/i......ndex.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.body[0..10] # => "<!doctype h"
//}... -
Net
:: HTTPResponse # header -> self (3003.0) -
互換性を保つためだけに導入されたメソッドです。 使わないでください。
互換性を保つためだけに導入されたメソッドです。
使わないでください。
自分自身を返します。 -
Net
:: HTTPResponse # message -> String (3003.0) -
HTTP サーバがリザルトコードに付加して返すメッセージです。 例えば 'Not Found' などです。
...P サーバがリザルトコードに付加して返すメッセージです。
例えば 'Not Found' などです。
msg は obsolete です。使わないでください。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.p......arse(uri))
response.message # => "OK"
//}... -
Net
:: HTTPResponse # msg -> String (3003.0) -
HTTP サーバがリザルトコードに付加して返すメッセージです。 例えば 'Not Found' などです。
...P サーバがリザルトコードに付加して返すメッセージです。
例えば 'Not Found' などです。
msg は obsolete です。使わないでください。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.p......arse(uri))
response.message # => "OK"
//}... -
Net
:: HTTPResponse # read _ body {|str| . . . . } -> () (3003.0) -
ブロックを与えなかった場合にはエンティティボディを 文字列で返します。 ブロックを与えた場合には エンティティボディを少しずつ取得して順次ブロックに 文字列で与えます。
...ire '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.parse('http://www.example.com/path/......o/big.file')
Net::HTTP.start(uri.host, uri.port) do |http|
File.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......ディを文字列として
返します。また一度ブロックを与えてこのメソッドを呼んだ場合には、
次からは Net::ReadAdapter のインスタンスが返ってきますが、
その場合はそのオブジェクトは使わないでください。
dest は obsolete で... -
Net
:: HTTPResponse # read _ body(dest=nil) -> String|nil (3003.0) -
ブロックを与えなかった場合にはエンティティボディを 文字列で返します。 ブロックを与えた場合には エンティティボディを少しずつ取得して順次ブロックに 文字列で与えます。
...ire '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.parse('http://www.example.com/path/......o/big.file')
Net::HTTP.start(uri.host, uri.port) do |http|
File.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......ディを文字列として
返します。また一度ブロックを与えてこのメソッドを呼んだ場合には、
次からは Net::ReadAdapter のインスタンスが返ってきますが、
その場合はそのオブジェクトは使わないでください。
dest は obsolete で... -
Net
:: HTTPResponse # reader _ header -> self (3003.0) -
互換性を保つためだけに導入されたメソッドです。 使わないでください。
互換性を保つためだけに導入されたメソッドです。
使わないでください。
自分自身を返します。 -
Net
:: HTTPResponse # value -> nil (3003.0) -
レスポンスが 2xx(成功)でなかった場合に、対応する 例外を発生させます。
...ます。
@raise HTTPError レスポンスが 1xx であるか、 net/http が知らない
種類のレスポンスである場合に発生します。
@raise HTTPRetriableError レスポンスが 3xx である場合に発生します。
@raise HTTPServerException レスポンス......発生します。
@raise HTTPFatalError レスポンスが 5xx である場合に発生します。
//emlist[例 レスポンスが 2xx(成功)][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.value # => nil
//}
//eml......ist[例 レスポンスが 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
//}...