1478件ヒット
[1-100件を表示]
(0.041秒)
種類
- インスタンスメソッド (1190)
- 特異メソッド (288)
ライブラリ
-
net
/ http (1478)
キーワード
- Proxy (12)
- active? (12)
- address (12)
-
ca
_ file (12) -
ca
_ file= (12) -
ca
_ path (12) -
ca
_ path= (12) - cert (12)
- cert= (12)
-
cert
_ store (12) -
cert
_ store= (12) - ciphers (12)
- ciphers= (12)
-
close
_ on _ empty _ response (12) -
close
_ on _ empty _ response= (12) -
continue
_ timeout (12) -
continue
_ timeout= (12) - copy (12)
-
default
_ port (12) - delete (12)
- finish (12)
- get (48)
- get2 (24)
-
get
_ print (24) -
get
_ response (24) - head (12)
- head2 (24)
-
http
_ default _ port (12) -
https
_ default _ port (12) -
is
_ version _ 1 _ 1? (12) -
is
_ version _ 1 _ 2? (12) -
keep
_ alive _ timeout (12) -
keep
_ alive _ timeout= (12) - key (12)
- key= (12)
-
local
_ host (12) -
local
_ host= (12) -
local
_ port (12) -
local
_ port= (12) - lock (12)
- mkcol (12)
- move (12)
- new (12)
-
open
_ timeout (12) -
open
_ timeout= (12) - patch (24)
-
peer
_ cert (12) - port (12)
- post (24)
- post2 (24)
-
post
_ form (12) - propfind (12)
- proppatch (12)
- proxy? (12)
-
proxy
_ address (24) -
proxy
_ address= (12) -
proxy
_ class? (12) -
proxy
_ from _ env= (12) -
proxy
_ from _ env? (12) -
proxy
_ pass (24) -
proxy
_ pass= (12) -
proxy
_ port (24) -
proxy
_ port= (12) -
proxy
_ uri (12) -
proxy
_ user (24) -
proxy
_ user= (12) - proxyaddr (12)
- proxyport (12)
- put (12)
- put2 (24)
-
read
_ timeout (12) -
read
_ timeout= (12) - request (24)
-
request
_ get (24) -
request
_ head (24) -
request
_ post (24) -
request
_ put (24) -
send
_ request (12) -
set
_ debug _ output (12) -
ssl
_ timeout (12) -
ssl
_ timeout= (12) -
ssl
_ version (12) -
ssl
_ version= (12) - start (48)
- started? (12)
- trace (12)
- unlock (12)
-
use
_ ssl= (12) -
use
_ ssl? (12) -
verify
_ callback (12) -
verify
_ callback= (12) -
verify
_ depth (12) -
verify
_ depth= (12) -
verify
_ mode (12) -
verify
_ mode= (12) -
version
_ 1 _ 1? (12) -
version
_ 1 _ 2 (12) -
version
_ 1 _ 2? (12) -
write
_ timeout (7) -
write
_ timeout= (7)
検索結果
先頭5件
-
Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse (8013.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 (8013.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 . Proxy(address , port = 80) -> Class (8013.0) -
Proxy 経由で http サーバに接続するためのクラスを作成し返します。
...ラスは Net::HTTP を継承しているので Net::HTTP と全く
同じように使えます。指定されたプロクシを常に経由して http サーバ
に接続します。
address が nil のときは Net::HTTP クラスをそのまま返します。
//emlist[例1: Net::HTTP.new を使......uire 'net/http'
proxy_class = Net::HTTP::Proxy('proxy.example.com', 8080)
http = proxy_class.new('www.example.org')
http.start {|h|
h.get('/ja/') # proxy.example.com 経由で接続します。
}
//}
//emlist[例2: Net::HTTP.start を使う][ruby]{
require 'net/http'
proxy_class = Net::HTTP::Prox... -
Net
:: HTTP . get _ print(host , path , port = 80) -> () (8013.0) -
指定した対象から HTTP でエンティティボディを取得し、 $stdout に出力します。
...ポートを整数で指定します。
@see Net::HTTP.get
=== 例
//emlist[][ruby]{
require 'net/http'
require 'uri'
Net::HTTP.get_print URI.parse('http://www.example.com/index.html')
//}
もしくは
//emlist[][ruby]{
require 'net/http'
Net::HTTP.get_print 'www.example.com', '/index.html'
//}... -
Net
:: HTTP . get _ print(uri) -> () (8013.0) -
指定した対象から HTTP でエンティティボディを取得し、 $stdout に出力します。
...ポートを整数で指定します。
@see Net::HTTP.get
=== 例
//emlist[][ruby]{
require 'net/http'
require 'uri'
Net::HTTP.get_print URI.parse('http://www.example.com/index.html')
//}
もしくは
//emlist[][ruby]{
require 'net/http'
Net::HTTP.get_print 'www.example.com', '/index.html'
//}... -
Net
:: HTTP # head(path , header = nil) -> Net :: HTTPResponse (8007.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 # local _ host=(host) (8007.0) -
接続に用いるローカルホスト名を指定します。
...ost ホスト名、もしくはアドレスを示す文字列
//emlist[例][ruby]{
require 'net/http'
http = Net::HTTP.new("www.example.com")
http.local_host = "192.168.0.5"
http.local_port = "53043"
http.start do |h|
p h.get("/").body
end
//}
@see Net::HTTP#local_host=, Net::HTTP#local_port... -
Net
:: HTTP # local _ port=(port) (8007.0) -
接続に用いるローカルポートを設定します。
...、もしくはサービス名文字列)
//emlist[例][ruby]{
require 'net/http'
http = Net::HTTP.new("www.example.com")
http.local_host = "192.168.0.5"
http.local_port = "53043"
http.start do |h|
p h.get("/").body
end
//}
@see Net::HTTP#local_port=, Net::HTTP#local_host
@see Net::HTTP.new... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse (8007.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...サーバ上の path にあるエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。
ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与え......例外が発生します。
また、返り値が [レスポンスオブジェクト, そのボディ] となります。
//emlist[例][ruby]{
# net/http version 1.1
response, body = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')
# version 1.2
response = http.post('/cgi-bin/search.rb......', 'query=subject&target=ruby')
# using block
File.open('save.html', 'w') {|f|
http.post('/cgi-bin/search.rb', 'query=subject&target=ruby') do |str|
f.write str
end
}
//}
@see Net::HTTP#request_post...