3件ヒット
[1-3件を表示]
(0.179秒)
ライブラリ
-
net
/ http (3)
キーワード
- head (1)
-
local
_ host= (1) -
local
_ port= (1)
検索結果
先頭3件
-
Net
:: HTTP # local _ host=(host) (18325.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) (18325.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 # head(path , header = nil) -> Net :: HTTPResponse (9325.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...