種類
- インスタンスメソッド (648)
- 特異メソッド (36)
- ライブラリ (24)
- モジュール関数 (12)
ライブラリ
- drb (24)
-
drb
/ extservm (12) -
net
/ http (588) - open-uri (12)
-
rinda
/ rinda (12) - uri (36)
-
webrick
/ httpresponse (12)
クラス
-
DRb
:: DRbServer (12) -
DRb
:: ExtServManager (12) -
Net
:: HTTPGenericRequest (96) -
Net
:: HTTPResponse (108) -
Rinda
:: DRbObjectTemplate (12) -
URI
:: Generic (24) -
WEBrick
:: HTTPResponse (12)
モジュール
- DRb (12)
-
Net
:: HTTPExceptions (12) -
Net
:: HTTPHeader (372) -
OpenURI
:: OpenRead (12) - URI (12)
キーワード
- [] (12)
- []= (12)
-
basic
_ auth (12) - body (24)
- body= (12)
-
body
_ stream (12) -
body
_ stream= (12) - chunked? (12)
- code (12)
- coerce (12)
-
content
_ length (12) -
content
_ length= (12) -
content
_ range (12) -
content
_ type (12) -
content
_ type= (12) - delete (12)
- each (12)
-
each
_ capitalized _ name (12) -
each
_ header (12) -
each
_ key (12) -
each
_ name (12) -
each
_ value (12) - entity (12)
- fetch (36)
-
form
_ data= (12) -
get
_ fields (12) -
http
_ version (12) - key? (12)
-
main
_ type (12) - method (24)
- msg (12)
- new (24)
- open-uri (12)
- parse (12)
- path (12)
-
proxy
_ basic _ auth (12) - range (12)
-
range
_ length (12) - read (12)
-
read
_ body (24) -
request
_ body _ permitted? (12) -
request
_ uri= (12) - response (12)
-
response
_ body _ permitted? (12) -
rinda
/ rinda (12) - select (12)
-
set
_ content _ type (12) -
set
_ form _ data (12) -
start
_ service (12) -
sub
_ type (12) -
type
_ params (12) - value (12)
検索結果
先頭5件
-
Net
:: HTTPHeader # main _ type -> String|nil (6.0) -
"text/html" における "text" のようなタイプを表す 文字列を返します。
...タイプを表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.main_type # => "text"
//}... -
Net
:: HTTPHeader # method -> String (6.0) -
リクエストの HTTP メソッドを文字列で返します。
...リクエストの HTTP メソッドを文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"
//}... -
Net
:: HTTPHeader # proxy _ basic _ auth(account , password) -> [String] (6.0) -
Proxy 認証のために Proxy-Authorization: ヘッダをセットします。
...ウント名を文字列で与えます。
@param password パスワードを文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.proxy_basic_auth("account", "password") # => ["Basic Y... -
Net
:: HTTPHeader # range _ length -> Integer|nil (6.0) -
Content-Range: ヘッダフィールドの表している長さを整数で返します。
...である場合に
発生します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['Content-Range'] = "bytes 1-500/1000"
req.range_leng... -
Net
:: HTTPHeader # set _ content _ type(type , params = {}) (6.0) -
type と params から Content-Type: ヘッダフィールドの 値を設定します。
...を文字列で指定します。
@param params パラメータ属性をハッシュで指定します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_type # => nil
req.co... -
Net
:: HTTPHeader # sub _ type -> String|nil (6.0) -
"text/html" における "html" のようなサブタイプを表す 文字列を返します。
...タイプを表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.sub_type # => "html"
//}... -
Net
:: HTTPHeader # type _ params -> Hash (6.0) -
Content-Type のパラメータを {"charset" => "iso-2022-jp"} という形の Hash で返します。
...返します。
Content-Type: ヘッダフィールドが存在しない場合には
空のハッシュを返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.type_params # => {"charset"=>"UTF-8"}
//}... -
Net
:: HTTPResponse # body -> String | () | nil (6.0) -
エンティティボディを返します。
...dapter のインスタンスを返しますが、
これは使わないでください。
entity は obsolete です。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.body[0..10] # => "<!doctype h"
//}... -
Net
:: HTTPResponse # code -> String (6.0) -
HTTP のリザルトコードです。例えば '302' などです。
...スオブジェクトがどのクラスのインスタンスかを
見ることでもレスポンスの種類を判別できます。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.code # => "200"
//}...