るりまサーチ

最速Rubyリファレンスマニュアル検索!
201件ヒット [101-200件を表示] (0.096秒)

別のキーワード

  1. _builtin using
  2. main using
  3. module using
  4. processcontroller using_at_exit_when_process_exit
  5. shell/process-controller using_at_exit_when_process_exit

ライブラリ

クラス

モジュール

キーワード

検索結果

<< < 1 2 3 > >>

Net::HTTP#get2(path, header = nil) {|response| .... } -> Net::HTTPResponse (7.0)

サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。

...t[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read

# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.read_body do |str| # read body now
print str
end...

Net::HTTP#post(path, data, header = nil, dest = nil) -> Net::HTTPResponse (7.0)

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

...p.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# version 1.2
response = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# using block
File.open('save.html', 'w') {|f|
http.post('/cgi-bin/search.rb', 'query=subject&target=ruby') do |str|
f.write str
end
}
//}

@see N...

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

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

...p.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# version 1.2
response = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')

# using block
File.open('save.html', 'w') {|f|
http.post('/cgi-bin/search.rb', 'query=subject&target=ruby') do |str|
f.write str
end
}
//}

@see N...

Net::HTTP#post2(path, data, header = nil) -> Net::HTTPResponse (7.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。

...[ruby]{
response = http.request_post('/cgi-bin/nice.rb', 'datadatadata...')
p response.status
puts response.body # body is already read

# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|
p response.status
p response['content-type']
response.read_body d...

Net::HTTP#post2(path, data, header = nil) {|response| .... } -> Net::HTTPResponse (7.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。

...[ruby]{
response = http.request_post('/cgi-bin/nice.rb', 'datadatadata...')
p response.status
puts response.body # body is already read

# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|
p response.status
p response['content-type']
response.read_body d...

絞り込み条件を変える

Net::HTTP#request_get(path, header = nil) -> Net::HTTPResponse (7.0)

サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。

...t[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read

# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.read_body do |str| # read body now
print str
end...

Net::HTTP#request_get(path, header = nil) {|response| .... } -> Net::HTTPResponse (7.0)

サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。

...t[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read

# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.read_body do |str| # read body now
print str
end...

Net::HTTP#request_post(path, data, header = nil) -> Net::HTTPResponse (7.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。

...[ruby]{
response = http.request_post('/cgi-bin/nice.rb', 'datadatadata...')
p response.status
puts response.body # body is already read

# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|
p response.status
p response['content-type']
response.read_body d...

Net::HTTP#request_post(path, data, header = nil) {|response| .... } -> Net::HTTPResponse (7.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。

...[ruby]{
response = http.request_post('/cgi-bin/nice.rb', 'datadatadata...')
p response.status
puts response.body # body is already read

# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|
p response.status
p response['content-type']
response.read_body d...

Refinement#import_methods(*modules) -> self (7.0)

モジュールからメソッドをインポートします。

...st[][ruby]{
module StrUtils
def indent(level)
' ' * level + self
end
end

module M
refine String do
import_methods StrUtils
end
end

using
M
p "foo".indent(3) # => " foo"

module M
refine String do
import_methods Enumerable
# Can't import method which is not defined with...

絞り込み条件を変える

<< < 1 2 3 > >>