キーワード
- active? (11)
- address (11)
-
ca
_ file (11) -
ca
_ file= (11) -
ca
_ path (11) -
ca
_ path= (11) - cert (11)
- cert= (11)
-
cert
_ store (11) -
cert
_ store= (11) - ciphers (11)
- ciphers= (11)
-
close
_ on _ empty _ response (11) -
close
_ on _ empty _ response= (11) -
continue
_ timeout (11) -
continue
_ timeout= (11) - copy (11)
- delete (11)
- finish (11)
- get (22)
- get2 (22)
- head (11)
- head2 (22)
-
keep
_ alive _ timeout (11) -
keep
_ alive _ timeout= (11) - key (11)
- key= (11)
-
local
_ host (11) -
local
_ host= (11) -
local
_ port (11) -
local
_ port= (11) - lock (11)
- mkcol (11)
- move (11)
-
open
_ timeout (11) -
open
_ timeout= (11) - patch (22)
-
peer
_ cert (11) - port (11)
- post (22)
- post2 (22)
- propfind (11)
- proppatch (11)
- proxy? (11)
-
proxy
_ address (11) -
proxy
_ address= (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)
-
read
_ timeout (11) -
read
_ timeout= (11) - request (22)
-
request
_ get (22) -
request
_ head (22) -
request
_ post (22) -
request
_ put (22) -
send
_ request (11) -
set
_ debug _ output (11) -
ssl
_ timeout (11) -
ssl
_ timeout= (11) -
ssl
_ version (11) -
ssl
_ version= (11) - start (22)
- started? (11)
- trace (11)
- unlock (11)
-
use
_ ssl= (11) -
use
_ ssl? (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
:: HTTP # finish -> () - Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse - Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse - Net
:: HTTP # get2(path , header = nil) -> Net :: HTTPResponse - Net
:: HTTP # get2(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse
-
Net
:: HTTP # finish -> () (4.0) -
HTTP セッションを終了します。セッション開始前にこのメソッドが 呼ばれた場合は例外 IOError を発生します。
HTTP セッションを終了します。セッション開始前にこのメソッドが
呼ばれた場合は例外 IOError を発生します。
@raise IOError セッション開始前に呼ぶと発生します。 -
Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse (4.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...サーバ上の path にあるエンティティを取得し、
Net::HTTPResponse のインスタンスとして返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......呼びだされたときは
エンティティボディを少しずつ文字列として
ブロックに与えます。このとき戻り値の
Net::HTTPResponse オブジェクトは有効な body を
持ちません。
dest は時代遅れの引数です。利用しないでください。
dest......、返り値が [レスポンスオブジェクト, そのボディ] となります。
//emlist[例][ruby]{
# net/http version 1.1
response, body = http.get( '/index.html' )
# net/http version 1.2
response = http.get('/index.html')
# compatible in both version
response , = http.get('/index.html'... -
Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (4.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...サーバ上の path にあるエンティティを取得し、
Net::HTTPResponse のインスタンスとして返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......呼びだされたときは
エンティティボディを少しずつ文字列として
ブロックに与えます。このとき戻り値の
Net::HTTPResponse オブジェクトは有効な body を
持ちません。
dest は時代遅れの引数です。利用しないでください。
dest......、返り値が [レスポンスオブジェクト, そのボディ] となります。
//emlist[例][ruby]{
# net/http version 1.1
response, body = http.get( '/index.html' )
# net/http version 1.2
response = http.get('/index.html')
# compatible in both version
response , = http.get('/index.html'... -
Net
:: HTTP # get2(path , header = nil) -> Net :: HTTPResponse (4.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......とともに呼び出されたときは、
エンティティボディをソケットから読み出す前に、
接続を維持した状態で Net::HTTPResponse
オブジェクトをブロックに渡します。
大きなサイズのボディを一度に読みだすとまずく、
小さなサイ......# body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.read_body do |str| # read body now
print str
end
}
//}
get2 は時代遅れなので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body... -
Net
:: HTTP # get2(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (4.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......とともに呼び出されたときは、
エンティティボディをソケットから読み出す前に、
接続を維持した状態で Net::HTTPResponse
オブジェクトをブロックに渡します。
大きなサイズのボディを一度に読みだすとまずく、
小さなサイ......# body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.read_body do |str| # read body now
print str
end
}
//}
get2 は時代遅れなので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body... -
Net
:: HTTP # head(path , header = nil) -> Net :: HTTPResponse (4.0) -
サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse のインスタンスを返します。
...サーバ上の path にあるエンティティのヘッダのみを取得します。
Net::HTTPResponse のインスタンスを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*......。
1.1 互換モードの場合は、レスポンスに応じて例外が発生します。
//emlist[例][ruby]{
require 'net/http'
response = nil
Net::HTTP.start('some.www.server', 80) {|http|
response = http.head('/index.html')
}
p response['content-type']
//}
@see Net::HTTP#request_head... -
Net
:: HTTP # head2(path , header = nil) -> Net :: HTTPResponse (4.0) -
サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティのヘッダのみを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*',......... } という
形のハッシュでなければいけません。
ブロックとともに呼び出されたときは、
Net::HTTP#request_get と同じ動作を
しますが、そもそもヘッダしか要求していないので
body は空です。そのためこの動作はそれほど意味......文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
head2 は時代遅れなので使わないでください。
//emlist[例][ruby]{
response = http.request_head('/index.html')
p response['content-type']
//}
@see Net::HTTP#head... -
Net
:: HTTP # head2(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (4.0) -
サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティのヘッダのみを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*',......... } という
形のハッシュでなければいけません。
ブロックとともに呼び出されたときは、
Net::HTTP#request_get と同じ動作を
しますが、そもそもヘッダしか要求していないので
body は空です。そのためこの動作はそれほど意味......文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
head2 は時代遅れなので使わないでください。
//emlist[例][ruby]{
response = http.request_head('/index.html')
p response['content-type']
//}
@see Net::HTTP#head... -
Net
:: HTTP # keep _ alive _ timeout -> Integer (4.0) -
以前のリクエストで使ったコネクションの再利用(keep-alive)を許可する秒数を 返します。
...以前のリクエストで使ったコネクションの再利用(keep-alive)を許可する秒数を
返します。
デフォルトは2(秒)です。
@see Net::HTTP#keep_alive_timeout=... -
Net
:: HTTP # keep _ alive _ timeout=(seconds) (4.0) -
以前のリクエストで使ったコネクションの再利用(keep-alive)を許可する秒数を 設定します。
...。
この秒数以内に同じホストに次のリクエストを送った場合、
ソケットを再利用します。
デフォルトは2(秒)です。これは一般的にサーバ側の keep-alive の秒数
が2秒である場合が多いからです。
@see Net::HTTP#keep_alive_timeout...