248件ヒット
[201-248件を表示]
(0.090秒)
種類
- インスタンスメソッド (179)
- モジュール関数 (27)
- 特異メソッド (19)
- ライブラリ (17)
- 定数 (6)
ライブラリ
- ビルトイン (71)
- mkmf (22)
-
net
/ http (132) -
shell
/ process-controller (6)
クラス
- Module (30)
-
Net
:: HTTP (132) - Refinement (3)
-
Shell
:: ProcessController (6)
モジュール
- Kernel (49)
オブジェクト
- main (11)
キーワード
-
USING
_ AT _ EXIT _ WHEN _ PROCESS _ EXIT (6) - bigdecimal (11)
-
check
_ signedness (22) - get (22)
- get2 (22)
-
import
_ methods (3) - lambda (13)
- post (22)
- post2 (22)
- proc (14)
- refine (11)
-
request
_ get (22) -
request
_ post (22) - shell (6)
-
used
_ modules (8)
検索結果
先頭5件
- Net
:: HTTP # request _ get(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse - Net
:: HTTP # request _ post(path , data , header = nil) -> Net :: HTTPResponse - Net
:: HTTP # request _ post(path , data , header = nil) {|response| . . . . } -> Net :: HTTPResponse - Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse - Net
:: HTTP # post(path , data , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse
-
Net
:: HTTP # request _ get(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (212.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...します。
Net::HTTPResponse オブジェクトを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけません。
ブロ......TP ヘッダをハッシュで指定します。
//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... -
Net
:: HTTP # request _ post(path , data , header = nil) -> Net :: HTTPResponse (212.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。
...す。
返り値は Net::HTTPResponse のインスタンスです。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけません。
ブロ......ダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
@param path POST先のエンティティのパスを文字列で指定します。
@param data POSTするデ......post2 は時代遅れなので使わないでください。
//emlist[例][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...') {|resp... -
Net
:: HTTP # request _ post(path , data , header = nil) {|response| . . . . } -> Net :: HTTPResponse (212.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。
...す。
返り値は Net::HTTPResponse のインスタンスです。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という
形のハッシュでなければいけません。
ブロ......ダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
@param path POST先のエンティティのパスを文字列で指定します。
@param data POSTするデ......post2 は時代遅れなので使わないでください。
//emlist[例][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...') {|resp... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse (206.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...ダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
dest は時代遅れの引数です。利用しないでください。
dest を指定した場合には
ボ......ィ] となります。
//emlist[例][ruby]{
# net/http version 1.1
response, body = http.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-... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (206.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...ダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
dest は時代遅れの引数です。利用しないでください。
dest を指定した場合には
ボ......ィ] となります。
//emlist[例][ruby]{
# net/http version 1.1
response, body = http.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-... -
Refinement
# import _ methods(*modules) -> self (206.0) -
モジュールからメソッドをインポートします。
...モジュールからメソッドをインポートします。
Module#includeと違って、import_methods はメソッドをコピーして
refinement に追加して、refinementでインポートしたメソッドを有効化します。
メソッドをコピーするため、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
//}...