ライブラリ
- ビルトイン (12)
-
net
/ http (96) - open-uri (12)
-
win32
/ registry (24)
クラス
-
Net
:: HTTP (96) - Thread (12)
-
Win32
:: Registry (24)
モジュール
-
OpenURI
:: OpenRead (12)
キーワード
- get2 (24)
- post2 (24)
- raise (12)
-
request
_ get (24) -
request
_ post (24) - write (12)
検索結果
先頭5件
-
OpenURI
:: OpenRead # read(options = {}) -> String (21130.0) -
自身が表す内容を読み込んで文字列として返します。 self.open(options={}) {|io| io.read } と同じです。 このメソッドによって返される文字列は OpenURI::Meta によって extend されています。
...ons={}) {|io| io.read } と同じです。
このメソッドによって返される文字列は OpenURI::Meta
によって extend されています。
@param options ハッシュを与えます。
require 'open-uri'
uri = URI.parse('http://www.example.com/')
str = uri.read
p str.is_a?(O......penURI::Meta) # => true
p str.content_type... -
Win32
:: Registry # read(name , *rtype) (18214.0) -
@todo
...@todo
レジストリ値 name を読み,[ type, data ]
の配列で返します。
name が nil の場合,(標準) レジストリ値が読み込まれます。
type はレジストリ値の型です。(⇒Win32::Registry::Constants)
data はレジストリ値のデータで,クラスは以......WORD
Integer
* REG_BINARY
String (バイナリデータを含みます)
オプション引数 rtype が指定されていた場合,レジストリ値の型が
与えられた rtype の配列に存在するかチェックされ,存在しない場合に
TypeError が発生します。......nteger
* REG_BINARY, REG_NONE
String (バイナリデータを含みます)
オプション引数 rtype が指定されていた場合,レジストリ値の型が
与えられた rtype の配列に存在するかチェックされ,存在しない場合に
TypeError が発生します。... -
Thread
# raise(error _ type , message , traceback) -> () (3108.0) -
自身が表すスレッドで強制的に例外を発生させます。
...外を発生させます。
@param error_type Kernel.#raise を参照してください。
@param message Kernel.#raise を参照してください。
@param traceback Kernel.#raise を参照してください。
Thread.new {
sleep 1
Thread.main.raise "foobar"
}
begin
sleep... -
Win32
:: Registry # write(name , type , data) (120.0) -
@todo
...do
レジストリ値 name に型 type で data を書き込みます。
name が nil の場合,(標準) レジストリ値に書き込みます。
type はレジストリ値の型です。(⇒Win32::Registry::Constants)
data のクラスは Win32::Registry#read
メソッドに準じていなけ... -
Net
:: HTTP # post2(path , data , header = nil) -> Net :: HTTPResponse (43.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。
...ブジェクトをブロックに渡します。
POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
@param path POST先のエン......se.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 do |str| # read body now
print str
end
}
//}
@see Net::HTTP#post, Net::HTTPResponse#read_body... -
Net
:: HTTP # post2(path , data , header = nil) {|response| . . . . } -> Net :: HTTPResponse (43.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。
...ブジェクトをブロックに渡します。
POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
@param path POST先のエン......se.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 do |str| # read body now
print str
end
}
//}
@see Net::HTTP#post, Net::HTTPResponse#read_body... -
Net
:: HTTP # request _ post(path , data , header = nil) -> Net :: HTTPResponse (43.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。
...ブジェクトをブロックに渡します。
POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
@param path POST先のエン......se.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 do |str| # read body now
print str
end
}
//}
@see Net::HTTP#post, Net::HTTPResponse#read_body... -
Net
:: HTTP # request _ post(path , data , header = nil) {|response| . . . . } -> Net :: HTTPResponse (43.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。
...ブジェクトをブロックに渡します。
POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
@param path POST先のエン......se.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 do |str| # read body now
print str
end
}
//}
@see Net::HTTP#post, Net::HTTPResponse#read_body... -
Net
:: HTTP # get2(path , header = nil) -> Net :: HTTPResponse (37.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...nse = 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
}
//}
get2 は時代遅れ......なので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body...