るりまサーチ

最速Rubyリファレンスマニュアル検索!
110件ヒット [1-100件を表示] (0.038秒)
トップページ > クエリ:index[x] > クエリ:new[x] > クエリ:body[x]

別のキーワード

  1. matrix index
  2. matrix find_index
  3. _builtin find_index
  4. _builtin index
  5. matrix each_with_index

検索結果

<< 1 2 > >>

Net::HTTPGenericRequest#body -> String (18131.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) (6232.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#request_body_permitted? -> bool (6131.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 (6131.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::HTTPGenericRequest#body_stream -> object (6126.0)

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

...rse('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...

絞り込み条件を変える

Net::HTTPGenericRequest#body_stream=(f) (6126.0)

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

...rse('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...

ruby 1.9 feature (3504.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

...* [regexp]: 正規表現の機能拡張
* [marshal]: Marshal ファイルのフォーマット変更
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど(互換性のある変更) (only backward-...
...=== 2005-04-02

: ENV.key [new]
: ENV.index [obsolete]

((<ruby-dev:25974>))

=== 2005-03-09

: Ruby 2.0 ブロックローカル変数

((<URL:http://www.rubyist.net/~matz/20050309.html#p03>))

=== 2005-03-04

: Time.strptime [lib][new]
: ParseDate.strptime [lib][new]

time ライブラリ,...
...[lib] [new]
: Net::HTTPHeader#content_type [lib] [new]
: Net::HTTPHeader#main_type [lib] [new]
: Net::HTTPHeader#sub_type [lib] [new]
: Net::HTTPHeader#type_params [lib] [new]
: Net::HTTPHeader#content_type= [lib] [new]
: Net::HTTPHeader#set_content_type [lib] [new]

: Net::HTTPRequest#body(=)...

ruby 1.6 feature (3294.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...00019>))

: 2002-09-11: Queue#((<Queue/pop>))

Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))

: 2002-09-11: SizedQueue.new

引数に 0 以下を受けつけるバグが修正されました。

: 2002-09-05: ((<リテラル/式展開>))

stable snapshot で、一...
...返していた
p "foo".slice!(5,10)

=> ruby 1.6.7 (2002-03-01) [i586-linux]
nil
-:2:in `slice!': index 5 out of string (IndexError)
from -:2
=> ruby 1.6.7 (2002-08-01) [i586-linux]
nil
nil

: 2002-07-05 String#spli...
...last_func may not be set.

差分は以下のようです。

@@ -227,10 +227,7 @@ rb_add_method(klass, mid, node, noex)
NODE *body;

if (NIL_P(klass)) klass = rb_cObject;
- if (klass == rb_cObject) {
- rb_secure(4);
- }
- if (rb_safe_leve...

cgi/session (120.0)

CGI のセッション管理を行うライブラリ。

...に、
ブラウザを終了した時点で消滅します。

=== 使い方 (生成)

require 'cgi/session'
cgi = CGI.new
session = CGI::Session.new(cgi)

CGI::Session.new に CGI オブジェクトを渡します。クライアントから渡された
セッション ID はクッキーかク...
...in/ruby
require 'cgi'
require 'cgi/session'

cgi = CGI.new('html3')
File.umask(0077)
session = CGI::Session.new(cgi)
cgi.out('charset'=>'euc-jp') {
html = cgi.html {
cgi.head { cgi.title {'Form Demo'} }
cgi.body {
cgi.form('action'=>"#{CGI.escapeHTML(cgi.script_na...
...NV['SCRIPT_NAME'])}">[戻る]</a></p>
</body></html>
END
}
end
end

SessionDemo.new

=== 参考URL

* http://www.shugo.net/article/webdb2/#label:13
* http://www.modruby.net/doc/faq.ja.jis.html#label-13
* http://www.ruby-doc.org/stdlib/libdoc/cgi/rdoc/index.html...

net/http (108.0)

汎用データ転送プロトコル HTTP を扱うライブラリです。 実装は 2616 に基きます。

...com', '/index.html')
//}

//emlist[例2: URI を使う][ruby]{
require 'net/http'
require 'uri'
print Net::HTTP.get(URI.parse('http://www.example.com/index.html'))
//}

//emlist[例3: より汎用的な例][ruby]{
require 'net/http'
require 'uri'

url = URI.parse('http://www.example.com/index.html')...
...et('/index.html')
}
puts res.body
//}

//emlist[例4: 上の例よりさらに汎用的な例][ruby]{
require 'net/http'

url = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(url.path)
res = Net::HTTP.start(url.host, url.port) {|http|
http.request(req)
}
puts res.body
//}...
...{'q'=>'ruby', 'max'=>'50'})
puts res.body

#例2: 認証付きで POST する
res = Net::HTTP.post_form(URI.parse('http://jack:pass@www.example.com/todo.cgi'),
{'from'=>'2005-01-01', 'to'=>'2005-03-31'})
puts res.body

#例3: より細かく制御する
url = URI....

絞り込み条件を変える

<< 1 2 > >>