るりまサーチ

最速Rubyリファレンスマニュアル検索!
420件ヒット [1-100件を表示] (0.061秒)

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Net::HTTPGenericRequest#body_exist? -> bool (6303.0)

このメソッドは obsolete です。

...このメソッドは obsolete です。


Net::HTTPGenericRequest#response_body_permitted?
の別名です。...

Net::HTTPGenericRequest#request_body_permitted? -> bool (6303.0)

リクエストにエンティティボディを一緒に送ることが許されている 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_body_permitted? # => false
//}...

Net::HTTPGenericRequest#response_body_permitted? -> bool (6303.0)

サーバからのレスポンスにエンティティボディを含むことが許されている 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.response_body_permitted? # => false
//}...

Net::HTTPHeader#proxy_basic_auth(account, password) -> [String] (6219.0)

Proxy 認証のために Proxy-Authorization: ヘッダをセットします。

...Proxy 認証のために Proxy-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::HTTPGenericRequest#body_stream -> object (6209.0)

サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。

...ist[例][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') do |f|
# 大きなファイルを扱う際にメモリ消費を少なくできる
post.body_stream = f
post["Content-Length"] =...
...f.size
end
post.body_stream # => #<File:/path/to/test (closed)>
//}...

絞り込み条件を変える

Net::HTTPHeader#sub_type -> String|nil (6209.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::HTTP#set_debug_output(io) -> () (6203.0)

デバッグ出力の出力先を指定します。 このメソッドは深刻なセキュリティホールの原因 になるため、デバッグ以外では決して使わないでください。

...て使わないでください。

io に nil を指定するとデバッグ出力を止めます。

@param io 出力先を指定します。このオブジェクトは
メソッド << を持っている必要があります。

//emlist[例][ruby]{
http.set_debug_output($stderr)
//}...

Net::HTTP#verify_callback -> Proc (6203.0)

自身に設定されている検証をフィルタするコールバックを 返します。

...れている検証をフィルタするコールバックを
返します。

デフォルトのコールバックが設定されている場合には nil を返します。

@see Net::HTTP#verify_callback=,
OpenSSL::X509::Store#verify_callback,
OpenSSL::SSL::SSLContext#verify_callback...

Net::HTTPGenericRequest#body -> String (6203.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=...
<< 1 2 3 ... > >>