種類
- 文書 (68)
- インスタンスメソッド (24)
- ライブラリ (12)
ライブラリ
-
net
/ http (24)
クラス
-
Net
:: HTTP (24)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 5 . 0 (8) -
proxy
_ from _ env= (12) -
proxy
_ from _ env? (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 9 feature (12)
検索結果
先頭5件
-
net
/ http (38060.0) -
汎用データ転送プロトコル HTTP を扱うライブラリです。 実装は 2616 に基きます。
...y]{
require 'net/http'
print Net::HTTP.get('www.example.com', '/index.html')
//}
//emlist[例2: URI を使う][ruby]{
require 'net/http'
require 'uri'
print Net::HTTP.get(URI.parse('http://www.example.com/index.html'))
//}
//emlist[例3: より汎用的な例][ruby]{
require 'net/http'
require 'ur......{
require 'net/http'
url = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(url.path)
res = Net::HTTP.start(url.host, url.port) {|http|
http.request(req)
}
puts res.body
//}
==== フォームの情報を送信する (POST)
//emlist[例][ruby]{
require 'net/http'
require '......gi'),
{'from'=>'2005-01-01', 'to'=>'2005-03-31'})
puts res.body
#例3: より細かく制御する
url = URI.parse('http://www.example.com/todo.cgi')
req = Net::HTTP::Post.new(url.path)
req.basic_auth 'jack', 'pass'
req.set_form_data({'from'=>'2005-01-01', 'to'=>'2005-03-3... -
Net
:: HTTP # proxy _ from _ env=(boolean) (14107.0) -
プロクシ情報を環境変数から得るかどうかを指定します。
...プロクシ情報を環境変数から得るかどうかを指定します。
Net::HTTP#start で接続する前に設定する必要があります。
@param boolean プロクシ情報を環境変数から得るかどうかを指定する真偽値
@see Net::HTTP#proxy_from_env?... -
Net
:: HTTP # proxy _ from _ env? -> bool (14107.0) -
プロクシ情報を環境変数から得る場合に true を返します。
....start の proxy_address
引数に :ENV を渡した場合に true になります。
環境変数 http_proxy が定義されていなくともこの値は true を返します。
その場合にはプロクシは利用されず直接サーバに接続します。
@see Net::HTTP#proxy_from_env=... -
ruby 1
. 6 feature (246.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
....slice!(5,10)
=> ruby 1.6.7 (2002-03-01) [i586-linux]
nil
-:2:in `slice!': index 5 out of string (IndexError)
from -:2
=> ruby 1.6.7 (2002-08-01) [i586-linux]
nil
nil
: 2002-07-05 String#split
最初の引数に nil を......な
るのは引数省略時だけでした。
$; = ":"
p "a:b:c".split(nil)
=> -:2:in `split': bad separator (ArgumentError)
from -:2
ruby 1.6.7 (2002-03-01) [i586-linux]
=> ruby 1.6.7 (2002-07-30) [i586-linux]
["a", "b", "c"]
: 2002-06-15 Dir.glob......(2002-03-01) [i586-linux]
1
1
=> ruby 1.6.7 (2002-03-29) [i586-linux]
2
2
: 2002-03-22 ((<"net/http">))
Net::HTTP.new がブロックなしのときに nil を返していました。
((<ruby-bugs-ja:PR#214>))
net/protocol は削除さ... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (102.0) -
1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))
...Proc.new {|a,b,c| p [a,b,c]}.call(1,2)
=> -:1: wrong # of arguments (2 for 3) (ArgumentError)
from -:1:in `call'
from -:1
ruby 1.6.8 (2002-12-24) [i586-linux]
=> ruby 1.8.0 (2003-06-21) [i586-linu......c.new { break }.call
=> ruby 1.6.8 (2002-12-24) [i586-linux]
=> -:1:in `call': break from proc-closure (LocalJumpError)
from -:1
ruby 1.8.0 (2003-06-21) [i586-linux]
* lambda および proc が返す Proc は引数......() の第二引数(ローカルファイル名)が省略可能になりました。
メソッド get(), put(), binary(), binary = 追加
: ((<"net/http">)) [compat]
Net::HTTP のクラスメソッドで ((<URI>)) オブジェクトが使えるようになった。
Net::HTTP.get_print(URI... -
ruby 1
. 8 . 3 feature (48.0) -
ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))
...-e 'p File.join(1, 2)'
"1/2"
$ ruby-1.8.3 -e 'p File.join(1, 2)'
-e:1:in `join': can't convert Fixnum into String (TypeError)
from -e:1
=== 2005-09-16
: File.extname [ruby] [compat]
与えられた pathname がピリオドで終る場合、ピリオドではなく空......::HTTPHeader#each_capitalized
に名前が変わりました。canonical_each も each_capitalized の別名とし
て提供されます。
: net/http [lib] [new]
WebDAV のメソッドをサポートするようになりました。
PROPPATCH, LOCK, UNLOCK, OPTIONS, PROPFIND, DELETE, MOVE......0
"safe level: 0"
$ ruby-1.8.3 mthd_taint.rb
0
mthd_taint.rb:11:in `foo': calling insecure method: foo (SecurityError)
from mthd_taint.rb:11
=== 2005-09-09
: String#* [ruby] [compat]
: String#[] [ruby] [compat]
空文字にも taint が伝播するようにな... -
NEWS for Ruby 2
. 0 . 0 (36.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ence
from a method or a block.
* 追加: RubyVM::InstructionSequence#path,
RubyVM::InstructionSequence#absolute_path,
RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#base_label,
RubyVM::InstructionSequence#first_lineno to retrieve information from whe......wait_writable
* 追加: IO#wait_readable は IO#wait の別名です。
* json
* 1.7.7 に更新
* net/http
* 新機能
* Proxies are now automatically detected from the http_proxy environment
variable. See Net::HTTP.new for details.
* gzip and deflate compress......cross connections for a single instance.
This speeds up connection by using a previously negotiated session.
* Requests may be created from a URI which sets the request_uri and host
header of the request (but does not change the host connected to).
* Responses contain the... -
ruby 1
. 9 feature (24.0) -
ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。
...Header#set_content_type [lib] [new]
: Net::HTTPRequest#body(=) [lib] [new]
: Net::HTTPRequest#body_stream(=) [lib] [new]
=== 2004-03-05
: net/http [lib] [new]
support WebDAV methods, PROPPATCH, LOCK, UNLOCK, OPTIONS, PROPFIND,
DELETE, MOVE, COPY, MKCOL.
: Net::HTTPResponse#response [l......oge (Errno::ENOENT)
from -:1
p system("/tmp")
# => ruby 1.8.2 (2004-07-17) [i586-linux]
false
# => ruby 1.9.0 (2004-07-17) [i586-linux]
-:1:in `system': Permission denied - /tmp (Errno::EACCES)
from -:1
シェル......")'
"\000\000\000\000"
$ ruby -e 'p [2**32].pack("U")'
-e:1:in `pack': bignum too big to convert into `long' (RangeError)
from -e:1
=== 2004-01-22
: ((<組み込み定数/VERSION>)) [obsolete]
: ((<組み込み定数/RELEASE_DATE>)) [obsolete]
: ((<組み込... -
NEWS for Ruby 2
. 5 . 0 (18.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...r hides exceptions when comparing begin and
end with #<=> and raise a "bad value for range" ArgumentError
but instead lets the exception from the #<=> call go through.
7688
* Regexp
* Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05 に更新
* 非包含オペレ......す 14124
* matrix
* Matrix.combine, Matrix#combine を追加 10903
* Matrix#hadamard_product, Matrix#entrywise_product を追加
* net/http
* Net::HTTP.new が no_proxy パラメータをサポートしました 11195
* Net::HTTP#min_version Net::HTTP#max_version を追加 945......oves the speed of generating documents.
* It also facilitates supporting new syntax in the future.
* Support many new syntaxes of Ruby from the past few years.
* Use "frozen_string_literal: true".
This reduces document generation time by 5%.
* Support did_you_mean....