るりまサーチ

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

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 > >>

RubyVM::InstructionSequence#to_a -> Array (35237.0)

self の情報を 14 要素の配列にして返します。

...ォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。

: major_version

命令シーケンスのメジャーバージョン。

: minor_version

命令シーケンスのマイナーバージョン。

: format_type

データフォーマットを示す数...
...構成される Hash オブジェクト。

:arg_size: メソッド、ブロックが取る引数の総数(1 つもない場合は 0)。

:local_size: ローカル変数の総数 + 1。

:stack_max: スタックの深さ。(SystemStackError を検出するために使用)

: #label...
...: #first_lineno

命令シーケンスの 1 行目の行番号。

: type

命令シーケンスの種別。
:top、:method、:block、:class、:rescue、:ensure、:eval、:main、
:defined_guard のいずれか。

: locals

全ての引数名、ローカル変数名からなる Symbol...

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

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。

...文字列 data を
POST
で送ります。

返り値は Net::HTTPResponse のインスタンスです。

ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与えます。このとき戻り値の HTTPResponse オブジェ...
...クトは有効な body
持ちません。

POST
する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。

dest は時代遅れの引数で...
...取得して順次
「dest << ボディの断片」を実行します。

@param path POST先のパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。

1.1 互換モードの場合は...

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

リクエストにエンティティボディを一緒に送ることが許されている HTTP メソッド (POST など)の場合真を返します。

...ド (POST など)の場合真を返します。

//emlist[例][ruby]{
r
equire '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...

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

サーバからのレスポンスにエンティティボディを含むことが許されている HTTP メソッド (GET, POST など)の場合真を返します。

...GET, POST など)の場合真を返します。

//emlist[例][ruby]{
r
equire '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_permitt...

Net::HTTPGenericRequest#body_stream -> object (12243.0)

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

... read(size) メソッドが定義されている必要があります。

@param f エンティティボディのデータを得るストリームオブジェクトを与えます。

//emlist[例][ruby]{
r
equire '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::HTTPGenericRequest#body_stream=(f) (12243.0)

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

... read(size) メソッドが定義されている必要があります。

@param f エンティティボディのデータを得るストリームオブジェクトを与えます。

//emlist[例][ruby]{
r
equire '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::HTTPGenericRequest#body -> String (9231.0)

サーバに送るリクエストのエンティティボディを返します。

...クエストのエンティティボディを返します。

//emlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/index.html')
r
eq = Net::HTTP::Post.new(uri.request_uri)
r
eq.body = "Test Post Data"
r
eq.body # => "Test Post Data"
//}

@see Net::HTTPGenericRequest#body=...

Net::HTTPHeader#content_type -> String|nil (9225.0)

"text/html" のような Content-Type を表す 文字列を返します。

...tent-Type を表す
文字列を返します。

Content-Type: ヘッダフィールドが存在しない場合には nil を返します。

//emlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/comments.cgi?post=comment')
r
eq = Net::HTTP::Post.new(uri.request_uri)
r
eq.co...
...ntent_type # => nil
r
eq.content_type = 'multipart/form-data'
r
eq.content_type # => "multipart/form-data"
//}...

Net::HTTPGenericRequest#body=(body) (9131.0)

サーバに送るリクエストのエンティティボディを文字列で設定します。

...

@param body 設定するボディを文字列で与えます。

//emlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/index.html')
r
eq = Net::HTTP::Post.new(uri.request_uri)
r
eq.body = "Test Post Data" # => "Test Post Data"
//}

@see Net::HTTPGenericRequest#body...
<< 1 2 > >>