種類
- インスタンスメソッド (561)
- 文書 (37)
- ライブラリ (22)
ライブラリ
-
net
/ http (341) -
rubygems
/ remote _ fetcher (11) -
webrick
/ cgi (11) -
webrick
/ httprequest (22) -
webrick
/ httpservlet / abstract (77) -
webrick
/ httpservlet / cgihandler (22) -
webrick
/ httpservlet / erbhandler (22) -
webrick
/ httpservlet / filehandler (33) -
webrick
/ httpservlet / prochandler (22)
クラス
-
Gem
:: RemoteFetcher (11) -
Net
:: HTTP (143) -
Net
:: HTTPGenericRequest (33) -
Net
:: HTTPResponse (11) -
WEBrick
:: CGI (11) -
WEBrick
:: HTTPRequest (22) -
WEBrick
:: HTTPServlet :: AbstractServlet (77) -
WEBrick
:: HTTPServlet :: CGIHandler (22) -
WEBrick
:: HTTPServlet :: DefaultFileHandler (22) -
WEBrick
:: HTTPServlet :: ERBHandler (22) -
WEBrick
:: HTTPServlet :: FileHandler (11) -
WEBrick
:: HTTPServlet :: ProcHandler (22)
モジュール
-
Net
:: HTTPHeader (154)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (4) - [] (11)
-
add
_ field (11) -
basic
_ auth (11) - cgi (11)
-
content
_ length (11) -
content
_ range (11) - delete (11)
-
do
_ DELETE (11) -
do
_ GET (66) -
do
_ HEAD (11) -
do
_ OPTIONS (11) -
do
_ POST (44) -
do
_ PUT (11) -
each
_ capitalized _ name (11) - fetch (33)
- get2 (22)
- head2 (22)
-
make
_ partial _ content (11) - method (22)
- path (11)
-
proxy
_ basic _ auth (11) - range (11)
-
range
_ length (11) -
read
_ body (11) -
request
_ get (22) -
request
_ head (22) -
request
_ line (11) -
request
_ method (11) -
response
_ body _ permitted? (11) -
ruby 1
. 8 . 3 feature (11) -
send
_ request (11) - service (22)
-
webrick
/ cgi (11) - 制御構造 (11)
検索結果
先頭5件
- Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse - Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse - Net
:: HTTP # request(request , data = nil) -> Net :: HTTPResponse - Net
:: HTTP # request(request , data = nil) {|response| . . . . } -> Net :: HTTPResponse - Gem
:: RemoteFetcher # request(uri , request _ class , last _ modified = nil) -> Net :: HTTPResponse
-
Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse (18338.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...サーバ上の path にあるエンティティを取得し、
Net::HTTPResponse のインスタンスとして返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......//emlist[例][ruby]{
# net/http version 1.1
response, body = http.get( '/index.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 (18338.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...サーバ上の path にあるエンティティを取得し、
Net::HTTPResponse のインスタンスとして返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......//emlist[例][ruby]{
# net/http version 1.1
response, body = http.get( '/index.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 # request(request , data = nil) -> Net :: HTTPResponse (18338.0) -
Net::HTTPRequest オブジェクト request をサーバに送信します。
...Net::HTTPRequest オブジェクト request をサーバに送信します。
POST/PUT の時は data も与えられます
(GET/HEAD などで data を与えると
ArgumentError を発生します)。
ブロックとともに呼びだされたときは
ソケットからボディを読みこ......ram request リクエストオブジェクトを与えます。
@param data リクエストのボディを文字列で与えます。
@raise ArgumentError dataを与えるべきでないリクエストでdataを
与えた場合に発生します。
@see Net::HTTP#send_request... -
Net
:: HTTP # request(request , data = nil) {|response| . . . . } -> Net :: HTTPResponse (18338.0) -
Net::HTTPRequest オブジェクト request をサーバに送信します。
...Net::HTTPRequest オブジェクト request をサーバに送信します。
POST/PUT の時は data も与えられます
(GET/HEAD などで data を与えると
ArgumentError を発生します)。
ブロックとともに呼びだされたときは
ソケットからボディを読みこ......ram request リクエストオブジェクトを与えます。
@param data リクエストのボディを文字列で与えます。
@raise ArgumentError dataを与えるべきでないリクエストでdataを
与えた場合に発生します。
@see Net::HTTP#send_request... -
Gem
:: RemoteFetcher # request(uri , request _ class , last _ modified = nil) -> Net :: HTTPResponse (18320.0) -
与えられた URI に対してリクエストを実行し、Net::HTTPResponse を返します。
...与えられた URI に対してリクエストを実行し、Net::HTTPResponse を返します。
@param uri URI を指定します。
@param request_class Net::HTTP::Head か Net::HTTP::Get を指定します。
@param last_modified 最終更新時刻を指定します。
@see Net::HTTP, Net:......:HTTP::Head, Net::HTTP::Get... -
WEBrick
:: HTTPRequest # request _ line -> String (15317.0) -
クライアントのリクエストの最初の行(GET / HTTP/1.1)を文字列で返します。
...クライアントのリクエストの最初の行(GET / HTTP/1.1)を文字列で返します。... -
WEBrick
:: HTTPRequest # request _ method -> String (12217.0) -
クライアントのリクエストの HTTP メソッド(GET, POST,...)を文字列で返します。
...クライアントのリクエストの HTTP メソッド(GET, POST,...)を文字列で返します。... -
Net
:: HTTP # request _ get(path , header = nil) -> Net :: HTTPResponse (9342.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.read_body do |str| # read body now
print st......r
end
}
//}
get2 は時代遅れなので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body... -
Net
:: HTTP # request _ get(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (9342.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...サーバ上の path にあるエンティティを取得します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.read_body do |str| # read body now
print st......r
end
}
//}
get2 は時代遅れなので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body... -
WEBrick
:: HTTPServlet :: AbstractServlet # service(request , response) -> () (9271.0) -
指定された WEBrick::HTTPRequest オブジェクト request の WEBrick::HTTPRequest#request_method に応じて、 自身の do_GET, do_HEAD, do_POST, do_OPTIONS... いずれかのメソッドを request と response を引数として呼びます。
...指定された WEBrick::HTTPRequest オブジェクト request の WEBrick::HTTPRequest#request_method に応じて、
自身の do_GET, do_HEAD, do_POST, do_OPTIONS... いずれかのメソッドを request と response を引数として呼びます。
WEBrick::HTTPServer オブジェクトは......クトを生成し service メソッドを呼びます。
特に理由が無い限り AbstractServlet のサブクラスがこのメソッドを定義する必要はありません。
@param request クライアントからのリクエストを表す WEBrick::HTTPRequest オブジェクトです......。
@param response クライアントへのレスポンスを表す WEBrick::HTTPResponse オブジェクトです。
@raise WEBrick::HTTPStatus::MethodNotAllowed
指定された WEBrick::HTTPRequest オブジェクト req が自身に定義されていない
HTTP のメソッド...