168件ヒット
[101-168件を表示]
(0.070秒)
クラス
-
CSV
:: FieldInfo (12) -
URI
:: MailTo (12)
モジュール
-
Net
:: HTTPHeader (144)
キーワード
- [] (12)
-
basic
_ auth (12) -
content
_ type (12) - delete (12)
- fetch (36)
-
get
_ fields (12) - headers (12)
-
main
_ type (12) - method (12)
-
proxy
_ basic _ auth (12) -
sub
_ type (12)
検索結果
先頭5件
-
Net
:: HTTPHeader # get _ fields(key) -> [String] (3226.0) -
key ヘッダフィールドの値 (文字列) を配列で返します。
...key ヘッダフィールドの値 (文字列) を配列で返します。
たとえばキー 'content-length' に対しては ['2048'] のような
文字列が得られます。一種類のヘッダフィールドが一つのヘッダの中
に複数存在することがありえます。
key は......ール名を文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.get_fields('accept-ranges') # => ["none"]
//}
@see Net::HTTPHeader#[] , Net::HTTPHeader#[]=,
Net::HTTPHeader#add_field... -
Net
:: HTTPHeader # delete(key) -> [String] | nil (3220.0) -
key ヘッダフィールドを削除します。
...には
nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length = 10
req.content_length # => 10
req.delete("Content-Length") # => ["10"]
req.content_length # => nil
//... -
Net
:: HTTPHeader # main _ type -> String|nil (3220.0) -
"text/html" における "text" のようなタイプを表す 文字列を返します。
...る "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... -
Net
:: HTTPHeader # sub _ type -> String|nil (3220.0) -
"text/html" における "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... -
Net
:: HTTPHeader # basic _ auth(account , password) -> [String] (3214.0) -
Authorization: ヘッダを BASIC 認証用にセットします。
...nt アカウント名を文字列で与えます。
@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.basic_auth("user", "pass") # => ["Basic dXNlc... -
Net
:: HTTPHeader # method -> String (3214.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"
//}...