853件ヒット
[401-500件を表示]
(0.187秒)
別のキーワード
クラス
-
CSV
:: FieldInfo (12) -
JSON
:: Parser (12) -
Net
:: HTTPGenericRequest (36) -
Net
:: HTTPResponse (96) - Object (30)
- OptionParser (408)
-
Ripper
:: Lexer (12) -
RubyVM
:: AbstractSyntaxTree :: Node (7) - String (12)
-
URI
:: MailTo (36)
モジュール
-
Net
:: HTTPHeader (144) -
OptionParser
:: Arguable (48)
キーワード
- [] (12)
-
basic
_ auth (12) - body (24)
- code (12)
-
content
_ type (12) -
default
_ argv (12) - delete (12)
- entity (12)
- environment (12)
- fetch (36)
-
get
_ fields (12) - header (12)
- headers (12)
- help (12)
-
http
_ version (12) - inspect (7)
-
main
_ type (12) - method (24)
- msg (12)
- on (144)
- order (48)
- order! (48)
- parse! (24)
-
parse
_ csv (12) - path (12)
- permute (24)
- permute! (24)
-
program
_ name (12) -
proxy
_ basic _ auth (12) -
read
_ body (24) - release (12)
- source (12)
-
sub
_ type (12) -
summary
_ indent (12) - then (14)
-
to
_ a (12) -
to
_ mailtext (12) -
to
_ rfc822text (12) -
to
_ s (12) - ver (12)
-
yield
_ self (16)
検索結果
先頭5件
-
Net
:: HTTPHeader # basic _ auth(account , password) -> [String] (6220.0) -
Authorization: ヘッダを BASIC 認証用にセットします。
...Authorization: ヘッダを BASIC 認証用にセットします。
@param account アカウント名を文字列で与えます。
@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 dXNlcjpwYXNz"]
//}... -
Net
:: HTTPHeader # content _ type -> String|nil (6220.0) -
"text/html" のような Content-Type を表す 文字列を返します。
..."text/html" のような Content-Type を表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/comments.cgi?post=comment')
req = Net::HTTP::Post.......new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data'
req.content_type # => "multipart/form-data"
//}... -
Net
:: HTTPHeader # delete(key) -> [String] | nil (6220.0) -
key ヘッダフィールドを削除します。
...eturn 取り除かれたフィールドの値を返します。
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 # get _ fields(key) -> [String] (6220.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 # main _ type -> String|nil (6220.0) -
"text/html" における "text" のようなタイプを表す 文字列を返します。
..."text/html" における "text" のようなタイプを表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_r......esponse(uri)
res.main_type # => "text"
//}... -
Net
:: HTTPHeader # method -> String (6220.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] (6220.0) -
Proxy 認証のために Proxy-Authorization: ヘッダをセットします。
...oxy-Authorization: ヘッダをセットします。
@param account アカウント名を文字列で与えます。
@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 YWNjb3VudDpwYXNzd29yZA=="]
//}... -
Net
:: HTTPHeader # sub _ type -> String|nil (6220.0) -
"text/html" における "html" のようなサブタイプを表す 文字列を返します。
..."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
:: HTTPResponse # http _ version -> String (6220.0) -
サーバがサポートしている HTTP のバージョンを文字列で返します。
...サーバがサポートしている HTTP のバージョンを文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.http_version # => "1.1"
//}... -
OptionParser
# ver -> String (6220.0) -
program_name、version と release から生成したバージョンを表す文字列を返します。
...//emlist[例][ruby]{
require "optparse"
OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]"
opts.program_name = "Optparse Example"
opts.version = [0, 1]
opts.release = "2019-05-01"
opts.on_tail("--version", "Show version") do
puts opts.ver # => "Optparse Example......0.1 (2019-05-01)"
exit
end
opts.parse!(ARGV)
end
//}...