9件ヒット
[1-9件を表示]
(0.057秒)
クラス
-
Net
:: HTTP (1) -
Net
:: HTTPGenericRequest (1) -
Net
:: HTTPResponse (4)
モジュール
-
Net
:: HTTPHeader (3)
キーワード
-
basic
_ auth (1) - body (2)
- entity (1)
-
proxy
_ basic _ auth (1) -
read
_ body (2) -
ssl
_ version (1) -
sub
_ type (1)
検索結果
先頭5件
-
Net
:: HTTPResponse # body -> String | () | nil (18613.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
:: HTTPGenericRequest # body -> String (18610.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::HTTPGe... -
Net
:: HTTPHeader # basic _ auth(account , password) -> [String] (18610.0) -
Authorization: ヘッダを BASIC 認証用にセットします。
...unt アカウント名を文字列で与えます。
@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 dXNl... -
Net
:: HTTPHeader # proxy _ basic _ auth(account , password) -> [String] (18610.0) -
Proxy 認証のために Proxy-Authorization: ヘッダをセットします。
...unt アカウント名を文字列で与えます。
@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") # =>... -
Net
:: HTTPHeader # sub _ type -> String|nil (18610.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
:: HTTPResponse # read _ body(dest=nil) -> String|nil (18610.0) -
ブロックを与えなかった場合にはエンティティボディを 文字列で返します。 ブロックを与えた場合には エンティティボディを少しずつ取得して順次ブロックに 文字列で与えます。
...果取得][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.read_body[0..10] # => "<!doctype h"
//}
//emlist[例2 ブロックを与えて大きいファイルを取得][ruby]{
require 'net/http'
uri = URI.parse('http:/... -
Net
:: HTTPResponse # read _ body {|str| . . . . } -> () (18310.0) -
ブロックを与えなかった場合にはエンティティボディを 文字列で返します。 ブロックを与えた場合には エンティティボディを少しずつ取得して順次ブロックに 文字列で与えます。
...果取得][ruby]{
require 'net/http'
uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.read_body[0..10] # => "<!doctype h"
//}
//emlist[例2 ブロックを与えて大きいファイルを取得][ruby]{
require 'net/http'
uri = URI.parse('http:/... -
Net
:: HTTPResponse # entity -> String | () | nil (9313.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
:: HTTP # ssl _ version -> String | Symbol | nil (610.0) -
利用するプロトコルの種類を返します。
利用するプロトコルの種類を返します。
@see Net::HTTP#ssl_version=