172件ヒット
[101-172件を表示]
(0.085秒)
別のキーワード
クラス
- Module (24)
-
Net
:: HTTP (144) - Refinement (4)
キーワード
- get (24)
- get2 (24)
-
import
_ methods (4) - post (24)
- post2 (24)
- refine (12)
-
request
_ get (24) -
request
_ post (24)
検索結果
先頭5件
- Net
:: HTTP # get2(path , header = nil) -> Net :: HTTPResponse - Net
:: HTTP # get2(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse - Net
:: HTTP # request _ get(path , header = nil) -> Net :: HTTPResponse - Net
:: HTTP # request _ get(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse - Refinement
# import _ methods(*modules) -> self
-
Net
:: HTTP # get2(path , header = nil) -> Net :: HTTPResponse (125.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...ュで指定します。
//emlist[例][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| #... -
Net
:: HTTP # get2(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (125.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...ュで指定します。
//emlist[例][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| #... -
Net
:: HTTP # request _ get(path , header = nil) -> Net :: HTTPResponse (125.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...ュで指定します。
//emlist[例][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| #... -
Net
:: HTTP # request _ get(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (125.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...ュで指定します。
//emlist[例][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| #... -
Refinement
# import _ methods(*modules) -> self (125.0) -
モジュールからメソッドをインポートします。
...ため、Rubyコードで定義されたメソッドだけしか
インポートできないことに注意してください。
//emlist[][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 Ruby code: Enumerable#drop
end
end
//}... -
Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse (113.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...となります。
//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', 'w')... -
Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (113.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...となります。
//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', 'w')...