696件ヒット
[101-200件を表示]
(0.044秒)
種類
- インスタンスメソッド (384)
- ライブラリ (132)
- 文書 (72)
- 特異メソッド (60)
- クラス (48)
ライブラリ
- date (24)
-
net
/ http (228) -
rexml
/ sax2listener (12) -
webrick
/ httpauth / basicauth (12) -
webrick
/ httpproxy (12) -
webrick
/ httpserver (24) -
webrick
/ httpservlet / abstract (84) -
webrick
/ httputils (96)
クラス
- Date (12)
- DateTime (12)
-
Net
:: HTTP (204) -
Net
:: HTTPResponse (24) -
WEBrick
:: HTTPServer (12) -
WEBrick
:: HTTPServlet :: AbstractServlet (72) -
WEBrick
:: HTTPUtils :: FormData (96)
モジュール
-
REXML
:: SAX2Listener (12)
キーワード
- AbstractServlet (12)
- BasicAuth (12)
- HTTPProxyServer (12)
- HTTPServer (12)
-
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) - Proxy (12)
- [] (12)
-
cgi
/ session (12) -
do
_ DELETE (12) -
do
_ GET (12) -
do
_ HEAD (12) -
do
_ OPTIONS (12) -
do
_ POST (12) -
do
_ PUT (12) - drb (12)
-
drb
/ gw (12) -
each
_ data (12) - filename (12)
- filename= (12)
- head (12)
- httpdate (24)
- list (12)
-
local
_ host= (12) -
local
_ port= (12) - name (12)
- name= (12)
-
net
/ http (12) -
net
/ imap (12) -
open
_ timeout= (12) -
proxy
_ address= (12) -
proxy
_ from _ env= (12) -
proxy
_ from _ env? (12) -
proxy
_ pass= (12) -
proxy
_ port= (12) -
proxy
_ user= (12) -
read
_ body (24) -
rexml
/ parsers / pullparser (12) -
rexml
/ parsers / sax2parser (12) -
rexml
/ parsers / streamparser (12) -
rinda
/ rinda (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ssl
_ timeout= (12) -
start
_ prefix _ mapping (12) - started? (12)
-
to
_ ary (12) -
virtual
_ host (12) - webrick (12)
-
webrick
/ cgi (12)
検索結果
先頭5件
-
Net
:: HTTP # started? -> bool (6116.0) -
HTTP セッションが開始されていたら真を返します。
...
HTTP セッションが開始されていたら真を返します。
active? は時代遅れのメソッドです。... -
WEBrick
:: HTTPServer (6028.0) -
HTTP サーバの機能を提供するクラスです。
...HTTP サーバの機能を提供するクラスです。
以下は HTTP サーバとしてちゃんと動作する例です。
require 'webrick'
srv = WEBrick::HTTPServer.new({:DocumentRoot => '/home/username/public_html/',
:BindAddress => '127.0.0.1',......:Port => 10080})
srv.mount('/hoge.pl', WEBrick::HTTPServlet::CGIHandler, 'really_executed_script.rb')
Signal.trap(:INT){ srv.shutdown }
srv.start... -
WEBrick
:: HTTPProxyServer (6006.0) -
プロクシの機能を提供するクラスです。CONNECT メソッドにも対応しています。
...います。
* https://magazine.rubyist.net/articles/0002/0002-WEBrickProxy.html
以下は完全に動作するプロクシサーバの例です。
require 'webrick'
require 'webrick/httpproxy'
s = WEBrick::HTTPProxyServer.new(Port: 8080)
Signal.trap('INT') do
s.shutdown
end
s.start... -
Net
:: HTTP # head(path , header = nil) -> Net :: HTTPResponse (3148.0) -
サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse のインスタンスを返します。
...path にあるエンティティのヘッダのみを取得します。
Net::HTTPResponse のインスタンスを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } とい......リクエストの HTTP ヘッダをハッシュで指定します。
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... -
Net
:: HTTP . Proxy(address , port = 80) -> Class (3106.0) -
Proxy 経由で http サーバに接続するためのクラスを作成し返します。
...Proxy 経由で http サーバに接続するためのクラスを作成し返します。
このクラスは Net::HTTP を継承しているので Net::HTTP と全く
同じように使えます。指定されたプロクシを常に経由して http サーバ
に接続します。
address が n......il のときは Net::HTTP クラスをそのまま返します。
//emlist[例1: Net::HTTP.new を使う][ruby]{
require 'net/http'
proxy_class = Net::HTTP::Proxy('proxy.example.com', 8080)
http = proxy_class.new('www.example.org')
http.start {|h|
h.get('/ja/') # proxy.example.com 経由で接続......します。
}
//}
//emlist[例2: Net::HTTP.start を使う][ruby]{
require 'net/http'
proxy_class = Net::HTTP::Proxy('proxy.example.com', 8080)
proxy_class.start('www.example.org') {|h|
h.get('/ja/') # proxy.example.com 経由で接続します。
}
//}
@param address プロクシのホスト... -
Net
:: HTTPResponse # read _ body {|str| . . . . } -> () (3066.0) -
ブロックを与えなかった場合にはエンティティボディを 文字列で返します。 ブロックを与えた場合には エンティティボディを少しずつ取得して順次ブロックに 文字列で与えます。
...y]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.read_body[0..10] # => "<!doctype h"
//}
//emlist[例2 ブロックを与えて大きいファイルを取得][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.c......om/path/to/big.file')
Net::HTTP.start(uri.host, uri.port) do |http|
File.open("/path/to/big.file", "w") do |f|
# Net::HTTP#request_get と Net::HTTPResponse#read_body で少しずつ読み書き。メモリ消費が少ない。
http.request_get(uri.path) do |response|
response.read_b......い。
dest は obsolete です。使わないでください。
dest を指定した場合には
ボディを少しずつ取得して順次
「dest << ボディの断片」を実行します。
@param dest obsoleteな引数です。利用しないでください。
@see Net::HTTP#request_get... -
Net
:: HTTPResponse # read _ body(dest=nil) -> String|nil (3066.0) -
ブロックを与えなかった場合にはエンティティボディを 文字列で返します。 ブロックを与えた場合には エンティティボディを少しずつ取得して順次ブロックに 文字列で与えます。
...y]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.read_body[0..10] # => "<!doctype h"
//}
//emlist[例2 ブロックを与えて大きいファイルを取得][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.c......om/path/to/big.file')
Net::HTTP.start(uri.host, uri.port) do |http|
File.open("/path/to/big.file", "w") do |f|
# Net::HTTP#request_get と Net::HTTPResponse#read_body で少しずつ読み書き。メモリ消費が少ない。
http.request_get(uri.path) do |response|
response.read_b......い。
dest は obsolete です。使わないでください。
dest を指定した場合には
ボディを少しずつ取得して順次
「dest << ボディの断片」を実行します。
@param dest obsoleteな引数です。利用しないでください。
@see Net::HTTP#request_get... -
Net
:: HTTP # local _ port=(port) (3060.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 # local _ host=(host) (3054.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...