るりまサーチ

最速Rubyリファレンスマニュアル検索!
548件ヒット [101-200件を表示] (0.031秒)
トップページ > クエリ:body[x] > クエリ:net/http[x]

別のキーワード

  1. net/smtp start
  2. net/http get
  3. net/imap name
  4. net/imap param
  5. net/http start

検索結果

<< < 1 2 3 4 ... > >>

Net::HTTPGenericRequest#request_body_permitted? -> bool (14119.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 (14119.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::HTTPResponse.body_permitted? -> bool (14119.0)

エンティティボディを含むことが許されているレスポンスクラス ならば真を、そうでなければ偽を返します。

...エンティティボディを含むことが許されているレスポンスクラス
ならば真を、そうでなければ偽を返します。

//emlist[例][ruby]{
require 'net/http'

Net::HTTPSuccess.body_permitted? # => true
Net::HTTPNotModified.body_permitted? # => false
//}...

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

このメソッドは obsolete です。

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


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

Net::HTTPResponse#entity -> String | () | nil (11019.0)

エンティティボディを返します。

...

Net::HTTPResponse#read_body をブロック付きで呼んだ場合には
このメソッドはNet::ReadAdapter のインスタンスを返しますが、
これは使わないでください。

entity は obsolete です。

//emlist[例][ruby]{
require 'net/http'

uri = "http://www.example.c...
...om/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.body[0..10] # => "<!doctype h"
//}...

絞り込み条件を変える

Net::HTTP#get(path, header = nil, dest = nil) {|body_segment| .... } -> Net::HTTPResponse (8131.0)

サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。

...ボディを少しずつ文字列として
ブロックに与えます。このとき戻り値の
Net::HTTPResponse オブジェクトは有効な body
持ちません。

dest は時代遅れの引数です。利用しないでください。
dest を指定した場合には
ボディを少し...
...ィ] となります。

//emlist[例][ruby]{
# net/http version 1.1
response, body = http.get( '/index.html' )

# net/http version 1.2
response = http.get('/index.html')

# compatible in both version
response , = http.get('/index.html')
response.body

# compatible, using block
File.open('save.txt',...

Net::HTTP#lock(path, body, initheader = nil) -> Net::HTTPResponse (8123.0)

サーバの path に LOCK リクエストを ヘッダを initheader, ボディを body として送ります。

...クエストを
ヘッダを initheader, ボディを body として送ります。

レスポンスを Net::HTTPResponse のオブジェクト
で返します。

@param path リクエストを送るパスを文字列で与えます。
@param body リクエストのボディを文字列で与えま...

Net::HTTP#mkcol(path, body, initheader = nil) -> Net::HTTPResponse (8123.0)

サーバの path に MKCOL リクエストを ヘッダが initheader, ボディを body として送ります。

...クエストを
ヘッダが initheader, ボディを body として送ります。

レスポンスを Net::HTTPResponse のオブジェクト
で返します。

@param path リクエストを送るパスを文字列で与えます。
@param body リクエストのボディを文字列で与えま...

Net::HTTP#move(path, body, initheader = nil) -> Net::HTTPResponse (8123.0)

サーバの path に MOVE リクエストを ヘッダが initheader, ボディを body として送ります。

...クエストを
ヘッダが initheader, ボディを body として送ります。

レスポンスを Net::HTTPResponse のオブジェクト
で返します。

@param path リクエストを送るパスを文字列で与えます。
@param body リクエストのボディを文字列で与えま...
<< < 1 2 3 4 ... > >>