るりまサーチ

最速Rubyリファレンスマニュアル検索!
819件ヒット [1-100件を表示] (0.058秒)
トップページ > クエリ:uri[x] > クエリ:net/http[x]

別のキーワード

  1. net/smtp start
  2. net/http get
  3. net/imap name
  4. net/imap param
  5. net/pop pop

検索結果

<< 1 2 3 ... > >>

net/http (38144.0)

汎用データ転送プロトコル HTTP を扱うライブラリです。 実装は 2616 に基きます。

...net/http'
print Net::HTTP.get('www.example.com', '/index.html')
//}

//emlist[例2: URI を使う][ruby]{
require 'net/http'
require 'uri'
print Net::HTTP.get(URI.parse('http://www.example.com/index.html'))
//}

//emlist[例3: より汎用的な例][ruby]{
require 'net/http'
require 'uri'

url = URI...
...re 'net/http'

url = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(url.path)
res = Net::HTTP.start(url.host, url.port) {|http|
http.request(req)
}
puts res.body
//}

==== フォームの情報を送信する (POST)

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

#...
...例1: POSTするだけ
res = Net::HTTP.post_form(URI.parse('http://www.example.com/search'),
{'q'=>'ruby', 'max'=>'50'})
puts res.body

#例2: 認証付きで POST する
res = Net::HTTP.post_form(URI.parse('http://jack:pass@www.example.com/todo.cgi'),...

Net::HTTP#proxy_uri -> String|nil (14107.0)

このメソッドは内部用なので使わないでください。

...このメソッドは内部用なので使わないでください。

環境変数 http_proxy から得られるプロクシの URI を返します。...

Net::HTTPRequestURITooLong (14016.0)

HTTP レスポンス 414 (URI Too Large) を表現するクラスです。

...HTTP レスポンス 414 (URI Too Large) を表現するクラスです。

詳しくは 7231 Section 6.5.12 を見てください。...

Net::HTTPURITooLong (14016.0)

HTTP レスポンス 414 (URI Too Large) を表現するクラスです。

...HTTP レスポンス 414 (URI Too Large) を表現するクラスです。

詳しくは 7231 Section 6.5.12 を見てください。...

Net::HTTPRequestURITooLarge (14000.0)

Alias of Net::HTTPURITooLong

...Alias of Net::HTTPRequestURITooLong...
...Alias of Net::HTTPURITooLong...

絞り込み条件を変える

Net::HTTPRequestURITooLong (14000.0)

Alias of Net::HTTPURITooLong

...Alias of Net::HTTPURITooLong...

Net::HTTP.get_print(uri) -> () (8143.0)

指定した対象から HTTP でエンティティボディを取得し、 $stdout に出力します。

...ィボディを取得し、
$stdout に出力します。

対象の指定方法は URI で指定するか、
(host, path, port) で指定するかのいずれかです。

@param uri データの取得対象を URI で指定します。
@param host 接続先のホストを文字列で指定しま...
...ートを整数で指定します。
@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.post_form(uri, params) -> Net::HTTPResponse (8129.0)

URI で指定した対象に フォームのデータを HTTP で POST します。

...URI で指定した対象に フォームのデータを HTTP で
POST します。

送るデータは params に文字列から文字列への Hash として
渡します。

@param uri POST する対象を URI で指定します。
@param params POST するデータです。...

Net::HTTP.get(uri) -> String (8119.0)

指定した対象に GET リクエストを送り、そのボディを 文字列として返します。

...り、そのボディを
文字列として返します。

対象の指定方法は URI で指定するか、
(host, path, port) で指定するかのいずれかです。

@param uri データの取得対象を URI で指定します。
@param host 接続先のホストを文字列で指定しま...

Net::HTTP.get_response(uri) -> Net::HTTPResponse (8119.0)

指定した対象に GET リクエストを送り、そのレスポンスを Net::HTTPResponse として返します。

...スポンスを
Net::HTTPResponse として返します。

対象の指定方法は URI で指定するか、
(host, path, port) で指定するかのいずれかです。

@param uri データの取得対象を URI で指定します。
@param host 接続先のホストを文字列で指定しま...

絞り込み条件を変える

<< 1 2 3 ... > >>