るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.115秒)
トップページ > クエリ:t[x] > クエリ:Ruby[x] > 種類:インスタンスメソッド[x] > クエリ:require[x] > クラス:Net::HTTP[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. fiddle type_size_t
  5. matrix t

ライブラリ

キーワード

検索結果

Net::HTTP#local_host=(host) (6114.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) (6114.0)

接続に用いるローカルポートを設定します。

...ort ローカルポート(数値、もしくはサービス名文字列)

//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#l...
...ocal_host


@see Net::HTTP.new...

Net::HTTP#head(path, header = nil) -> Net::HTTPResponse (3114.0)

サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse のインスタンスを返します。

...ーバ上の path にあるエンティティのヘッダのみを取得します。
Net::HTTP
Response のインスタンスを返します。

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ....
...ram path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。

1.1 互換モードの場合は、レスポンスに応じて例外が発生します。

//emlist[例][ruby]{
require
'net/http'

re...
...sponse = nil
Net::HTTP
.start('some.www.server', 80) {|http|
response = http.head('/index.html')
}
p response['content-type']
//}

@see Net::HTTP#request_head...