種類
- インスタンスメソッド (44)
- 文書 (15)
- ライブラリ (11)
ライブラリ
-
net
/ http (44)
クラス
-
Net
:: HTTP (22) -
Net
:: HTTPGenericRequest (22)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (4) -
body
_ stream (11) -
body
_ stream= (11) -
net
/ pop (11) -
ruby 1
. 8 . 3 feature (11)
検索結果
先頭5件
-
Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse (18366.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...サーバ上の path にあるエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。
ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与え......nse オブジェクトは有効な body を
持ちません。
POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
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-bin/search.rb', '... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (18366.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...サーバ上の path にあるエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。
ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与え......nse オブジェクトは有効な body を
持ちません。
POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
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-bin/search.rb', '... -
Net
:: HTTPGenericRequest # body _ stream -> object (3042.0) -
サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。
...ディを
IO オブジェクトなどのストリームで設定します。
f は read(size) メソッドが定義されている必要があります。
@param f エンティティボディのデータを得るストリームオブジェクトを与えます。
//emlist[例][ruby]{
require 'net/......ri = 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 # => #<Fi... -
Net
:: HTTPGenericRequest # body _ stream=(f) (3042.0) -
サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。
...ディを
IO オブジェクトなどのストリームで設定します。
f は read(size) メソッドが定義されている必要があります。
@param f エンティティボディのデータを得るストリームオブジェクトを与えます。
//emlist[例][ruby]{
require 'net/......ri = 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 # => #<Fi... -
net
/ pop (196.0) -
このライブラリは、POP3 (Post Office Protocol version 3) を 用いてPOPサーバからメールを受信する機能を提供するライブラリです。
...このライブラリは、POP3 (Post Office Protocol version 3) を
用いてPOPサーバからメールを受信する機能を提供するライブラリです。
POP3 の実装は 1939 に基いています。
2449 で定義されているPOP3拡張には対応していません。
=== 使用......uire 'net/pop'
pop = Net::POP3.new('pop.example.com', 110)
pop.start('YourAccount', 'YourPassword') # POPのセッションを開始
if pop.mails.empty?
$stderr.puts 'no mail.'
else
pop.mails.each_with_index do |m, idx| # 各メッセージにアクセスする
File.open("i......nbox/#{idx + 1}", 'w') {|f|
f.write m.pop
}
m.delete
end
$stderr.puts "#{pop.mails.size} mails popped."
end
pop.finish # セッションを終了する
POP サーバはネットワークのむこうに存在するので、
な... -
ruby 1
. 8 . 3 feature (144.0) -
ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))
...変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影......File.extname("a.")'
""
=== 2005-09-13
: Logger#formatter [lib] [new]
: Logger#formatter= [lib] [new]
: Logger::Formatter [lib] [new]
追加。
=== 2005-09-13
: Net::HTTP
https での Proxy 認証をサポートするようになりました。
: Net::HTTP.post_form(url, params) [lib]......exist? [lib] [obsolete]
: Net::HTTPResponse#response [lib] [obsolete]
: Net::HTTPResponse#header [lib] [obsolete]
: Net::HTTPResponse#read_header [lib] [obsolete]
obsolete になりました。VERBOSE モードの時、警告が出ます。
=== 2005-09-10
: OpenSSL::PKCS7::RecipientIn... -
NEWS for Ruby 3
. 0 . 0 (96.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting......tion warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leading arguments.
16378
//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}
* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesig......> {b:}
p b #=> 0
//}
//emlist{
# version 3.0
0 in 1 #=> false
# version 2.7
0 in 1 #=> raise NoMatchingPatternError
//}
* Find-pattern is added. [EXPERIMENTAL]
16828
//emlist{
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
in [*pre, String => x, String => y, *post]
p pre #=> ["a", 1]
p...