別のキーワード
種類
- インスタンスメソッド (545)
- 特異メソッド (77)
ライブラリ
-
net
/ http (622)
キーワード
- Proxy (11)
-
ca
_ file (11) -
ca
_ path (11) - cert (11)
-
cert
_ store (11) - ciphers (11)
-
continue
_ timeout (11) - get (22)
- get2 (22)
- head (11)
- head2 (22)
- key (11)
-
local
_ host (11) -
local
_ port (11) -
open
_ timeout (11) - patch (22)
-
peer
_ cert (11) - post (22)
- post2 (22)
-
proxy
_ address (22) -
proxy
_ pass (22) -
proxy
_ port (22) -
proxy
_ uri (11) -
proxy
_ user (22) - proxyaddr (11)
- proxyport (11)
- put2 (22)
-
read
_ timeout (11) - request (22)
-
request
_ get (22) -
request
_ head (22) -
request
_ post (22) -
request
_ put (22) -
ssl
_ timeout (11) -
ssl
_ version (11) - start (44)
-
verify
_ mode (11) -
write
_ timeout (6)
検索結果
先頭5件
- Net
:: HTTP # ciphers -> String | [String] | nil - Net
:: HTTP # local _ port -> nil | Integer | String - Net
:: HTTP # ssl _ version -> String | Symbol | nil - Net
:: HTTP # post2(path , data , header = nil) {|response| . . . . } -> Net :: HTTPResponse - Net
:: HTTP # request _ post(path , data , header = nil) {|response| . . . . } -> Net :: HTTPResponse
-
Net
:: HTTP # ciphers -> String | [String] | nil (303.0) -
Net::HTTP#ciphers で設定した値を返します。
...Net::HTTP#ciphers で設定した値を返します。
OpenSSL::SSL::SSLContext#ciphers が返す値とは
異なるので注意してください。
@see Net::HTTP#ciphers=... -
Net
:: HTTP # local _ port -> nil | Integer | String (303.0) -
接続に用いるローカルポートを返します。
...接続に用いるローカルポートを返します。
nil の場合システムが適当にローカルポートを
決めます。
デフォルトは nil です。
@see Net::HTTP#local_port=, Net::HTTP#local_host... -
Net
:: HTTP # ssl _ version -> String | Symbol | nil (303.0) -
利用するプロトコルの種類を返します。
...利用するプロトコルの種類を返します。
@see Net::HTTP#ssl_version=... -
Net
:: HTTP # post2(path , data , header = nil) {|response| . . . . } -> Net :: HTTPResponse (269.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。
...サーバ上の path にあるエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { '......持した状態で Net::HTTPResponse
オブジェクトをブロックに渡します。
POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用い......request_post('/cgi-bin/nice.rb', 'datadatadata...')
p response.status
puts response.body # body is already read
# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|
p response.status
p response['content-type']
response.read_body do |str| # read body no... -
Net
:: HTTP # request _ post(path , data , header = nil) {|response| . . . . } -> Net :: HTTPResponse (269.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。
...サーバ上の path にあるエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { '......持した状態で Net::HTTPResponse
オブジェクトをブロックに渡します。
POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用い......request_post('/cgi-bin/nice.rb', 'datadatadata...')
p response.status
puts response.body # body is already read
# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|
p response.status
p response['content-type']
response.read_body do |str| # read body no... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (268.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...サーバ上の path にあるエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。
ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与え......な body を
持ちません。
POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
dest は時代遅れの引数です。利用し......gi-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#r... -
Net
:: HTTP # get2(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (233.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......nt-type']
puts response.body # 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 # request _ get(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (233.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......nt-type']
puts response.body # 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 # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (220.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...サーバ上の path にあるエンティティを取得し、
Net::HTTPResponse のインスタンスとして返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......呼びだされたときは
エンティティボディを少しずつ文字列として
ブロックに与えます。このとき戻り値の
Net::HTTPResponse オブジェクトは有効な body を
持ちません。
dest は時代遅れの引数です。利用しないでください。
dest.......html' )
# net/http version 1.2
response = http.get('/index.html')
# compatible in both version
response , = http.get('/index.html')
response.body
# compatible, using block
File.open('save.txt', 'w') {|f|
http.get('/~foo/', nil) do |str|
f.write str
end
}
//}
@see Net::HTTP#request_get... -
Net
:: HTTP # head2(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (209.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...