6件ヒット
[1-6件を表示]
(0.033秒)
ライブラリ
-
net
/ http (6)
キーワード
-
ca
_ file= (1) -
cert
_ store= (1) - get (2)
- post (2)
検索結果
先頭5件
- Net
:: HTTP # ca _ file=(path) - Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse - Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse - Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse - Net
:: HTTP # post(path , data , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse
-
Net
:: HTTP # ca _ file=(path) (18682.0) -
信頼する CA 証明書ファイルのパスを文字列で設定します。
...ファイルには複数の証明書を含んでいても構いません。
詳しくは OpenSSL::SSL::SSLContext#ca_file= を見てください。
デフォルトは nil (指定なし)です。
@param path ファイルパス文字列
@see Net::HTTP#ca_file, OpenSSL::SSL::SSLContext#ca_file=... -
Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse (394.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 # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (394.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 # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse (394.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...サーバ上の path にあるエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。
ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与え.......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... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (394.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...サーバ上の path にあるエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。
ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与え.......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... -
Net
:: HTTP # cert _ store=(store) (40.0) -
接続相手の証明書の検証のために使う、信頼している CA 証明書を 含む証明書ストアを設定します。
...アを設定します。
通常は Net::HTTP#ca_file= や Net::HTTP#ca_path= で
設定しますが、より詳細な設定をしたい場合にはこちらを用います。
デフォルトは nil (証明書ストアを指定しない)です。
@see Net::HTTP#cert_store=, OpenSSL::SSL::SSLContex...