種類
- インスタンスメソッド (8)
- 特異メソッド (3)
ライブラリ
-
net
/ http (9) - uri (1)
-
webrick
/ ssl (1)
クラス
-
Net
:: HTTP (1) -
Net
:: HTTPGenericRequest (8) -
URI
:: Generic (1) -
WEBrick
:: GenericServer (1)
キーワード
- body (1)
- body= (1)
-
body
_ stream (1) -
body
_ stream= (1) - method (1)
- path (1)
-
request
_ body _ permitted? (1) -
response
_ body _ permitted? (1)
検索結果
先頭5件
- URI
:: Generic . new(scheme , userinfo , host , port , registry , path , opaque , query , fragment , parser = URI :: DEFAULT _ PARSER , arg _ check = false) -> URI :: Generic - WEBrick
:: GenericServer . new(config = {} , default = WEBrick :: Config :: General) -> WEBrick :: GenericServer - Net
:: HTTP . new(address , port = 80 , proxy _ addr = :ENV , proxy _ port = nil , proxy _ user=nil , proxy _ pass=nil) -> Net :: HTTP - Net
:: HTTPGenericRequest # method -> String - Net
:: HTTPGenericRequest # request _ body _ permitted? -> bool
-
URI
:: Generic . new(scheme , userinfo , host , port , registry , path , opaque , query , fragment , parser = URI :: DEFAULT _ PARSER , arg _ check = false) -> URI :: Generic (63655.0) -
各引数を成分とする URI::Generic オブジェクトを生成して返します。
各引数を成分とする URI::Generic オブジェクトを生成して返します。
@param scheme 構成要素 scheme を表す文字列を与えます。
@param userinfo 構成要素を表す文字列を与えます。
@param host 構成要素を表す文字列を与えます。
@param port 構成要素を表す文字列を与えます。
@param registry 構成要素を表す文字列を与えます。
@param path 構成要素を表す文字列を与えます。
@param opaque 構成要素を表す文字列を与えます。
@param query 構成要素を表す文字列を与えます... -
WEBrick
:: GenericServer . new(config = {} , default = WEBrick :: Config :: General) -> WEBrick :: GenericServer (63604.0) -
GenericServer オブジェクトを生成して返します。
GenericServer オブジェクトを生成して返します。
config で有効な項目が増えます。以下は増える項目とそのデフォルト値です。
:ServerSoftware => "#{svrsoft} OpenSSL/#{osslv}",
:SSLEnable => true, # Ruby 1.8.3 以降では false がデフォルトです。
:SSLCertificate => nil,
:SSLPrivateKey => nil,
:SSLClientCA => nil,
:SS... -
Net
:: HTTP . new(address , port = 80 , proxy _ addr = :ENV , proxy _ port = nil , proxy _ user=nil , proxy _ pass=nil) -> Net :: HTTP (54322.0) -
新しい Net::HTTP オブジェクトを生成します。
新しい Net::HTTP オブジェクトを生成します。
proxy_addr に :ENV を指定すると自動的に環境変数 http_proxy からプロクシの URI を
取り出し利用します。この場合環境変数 http_proxy が定義されていない場合には
プロクシは利用せず直接接続します。
詳しくは URI::Generic#find_proxy を参照してください。
明示的にプロクシのホスト名とポート番号を指定してプロクシを利用することもできます。
このときには proxy_addr にホスト名もしくは IP アドレスを渡します。
このときに proxy_userを指定するとプロク... -
Net
:: HTTPGenericRequest # method -> String (9037.0) -
リクエストの HTTP メソッドを文字列で返します。
リクエストの HTTP メソッドを文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.method # => "POST"
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"
//} -
Net
:: HTTPGenericRequest # request _ body _ permitted? -> bool (9037.0) -
リクエストにエンティティボディを一緒に送ることが許されている HTTP メソッド (POST など)の場合真を返します。
リクエストにエンティティボディを一緒に送ることが許されている
HTTP メソッド (POST など)の場合真を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
post.request_body_permitted? # => true
head = Net::HTTP::Head.new(uri.request_uri)
head.request_bo... -
Net
:: HTTPGenericRequest # response _ body _ permitted? -> bool (9037.0) -
サーバからのレスポンスにエンティティボディを含むことが許されている HTTP メソッド (GET, POST など)の場合真を返します。
サーバからのレスポンスにエンティティボディを含むことが許されている
HTTP メソッド (GET, POST など)の場合真を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
post.response_body_permitted? # => true
head = Net::HTTP::Head.new(uri.request_uri)
head.r... -
Net
:: HTTPGenericRequest # body -> String (9019.0) -
サーバに送るリクエストのエンティティボディを返します。
サーバに送るリクエストのエンティティボディを返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.body = "Test Post Data"
req.body # => "Test Post Data"
//}
@see Net::HTTPGenericRequest#body= -
Net
:: HTTPGenericRequest # body=(body) (9019.0) -
サーバに送るリクエストのエンティティボディを文字列で設定します。
サーバに送るリクエストのエンティティボディを文字列で設定します。
@param body 設定するボディを文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.body = "Test Post Data" # => "Test Post Data"
//}
@see Net::HTTPGenericRequest#body -
Net
:: HTTPGenericRequest # body _ stream -> object (9019.0) -
サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。
サーバに送るリクエストのエンティティボディを
IO オブジェクトなどのストリームで設定します。
f は read(size) メソッドが定義されている必要があります。
@param f エンティティボディのデータを得るストリームオブジェクトを与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
File.open("/path/to/test", 'rb') d... -
Net
:: HTTPGenericRequest # body _ stream=(f) (9019.0) -
サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。
サーバに送るリクエストのエンティティボディを
IO オブジェクトなどのストリームで設定します。
f は read(size) メソッドが定義されている必要があります。
@param f エンティティボディのデータを得るストリームオブジェクトを与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
File.open("/path/to/test", 'rb') d... -
Net
:: HTTPGenericRequest # path -> String (9019.0) -
リクエストする path を文字列で返します。
リクエストする path を文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.path # => "/index.html"
//}