ronin 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data.tar.gz.sig +0 -0
- data/History.txt +95 -0
- data/Manifest.txt +55 -25
- data/README.txt +64 -52
- data/Rakefile +21 -14
- data/bin/ronin +1 -1
- data/bin/ronin-add +1 -1
- data/bin/ronin-console +1 -1
- data/bin/ronin-help +1 -1
- data/bin/ronin-install +1 -1
- data/bin/ronin-list +1 -1
- data/bin/ronin-remove +1 -1
- data/bin/ronin-uninstall +1 -1
- data/bin/ronin-update +1 -1
- data/lib/ronin.rb +2 -4
- data/lib/ronin/arch.rb +66 -21
- data/lib/ronin/author.rb +27 -18
- data/lib/ronin/cacheable.rb +63 -23
- data/lib/ronin/code/emittable.rb +1 -4
- data/lib/ronin/code/reference.rb +2 -5
- data/lib/ronin/code/symbol_table.rb +1 -4
- data/lib/ronin/code/token.rb +1 -4
- data/lib/ronin/config.rb +31 -10
- data/lib/ronin/database.rb +1 -4
- data/lib/ronin/database/database.rb +42 -23
- data/lib/ronin/database/exceptions.rb +1 -4
- data/lib/ronin/database/exceptions/invalid_config.rb +1 -4
- data/lib/ronin/environment.rb +1 -5
- data/lib/ronin/extensions.rb +1 -5
- data/lib/ronin/extensions/array.rb +8 -6
- data/lib/ronin/extensions/file.rb +9 -4
- data/lib/ronin/extensions/ip_addr.rb +33 -13
- data/lib/ronin/extensions/kernel.rb +44 -9
- data/lib/ronin/extensions/meta.rb +1 -4
- data/lib/ronin/extensions/string.rb +8 -7
- data/lib/ronin/extensions/uri.rb +1 -4
- data/lib/ronin/extensions/uri/http.rb +1 -48
- data/lib/ronin/extensions/uri/query_params.rb +27 -8
- data/lib/ronin/formatting.rb +1 -4
- data/lib/ronin/formatting/binary.rb +1 -4
- data/lib/ronin/formatting/digest.rb +1 -4
- data/lib/ronin/formatting/extensions.rb +1 -4
- data/lib/ronin/formatting/extensions/binary.rb +1 -4
- data/lib/ronin/formatting/extensions/binary/file.rb +3 -28
- data/lib/ronin/formatting/extensions/binary/integer.rb +31 -12
- data/lib/ronin/formatting/extensions/binary/string.rb +59 -36
- data/lib/ronin/formatting/extensions/digest.rb +1 -4
- data/lib/ronin/formatting/extensions/digest/string.rb +31 -9
- data/lib/ronin/formatting/extensions/http.rb +1 -4
- data/lib/ronin/formatting/extensions/http/string.rb +16 -9
- data/lib/ronin/formatting/extensions/text.rb +1 -4
- data/lib/ronin/formatting/extensions/text/array.rb +17 -7
- data/lib/ronin/formatting/extensions/text/string.rb +70 -27
- data/lib/ronin/formatting/http.rb +1 -4
- data/lib/ronin/formatting/text.rb +1 -4
- data/lib/ronin/license.rb +72 -65
- data/lib/ronin/model.rb +1 -4
- data/lib/ronin/model/has_description.rb +37 -8
- data/lib/ronin/model/has_license.rb +12 -8
- data/lib/ronin/model/has_name.rb +10 -7
- data/lib/ronin/model/has_version.rb +14 -4
- data/lib/ronin/model/model.rb +71 -14
- data/lib/ronin/network.rb +1 -4
- data/lib/ronin/network/esmtp.rb +1 -4
- data/lib/ronin/network/extensions.rb +1 -4
- data/lib/ronin/network/extensions/esmtp.rb +1 -4
- data/lib/ronin/network/extensions/esmtp/net.rb +49 -21
- data/lib/ronin/network/extensions/http.rb +1 -4
- data/lib/ronin/network/extensions/http/net.rb +319 -531
- data/lib/ronin/network/extensions/imap.rb +1 -4
- data/lib/ronin/network/extensions/imap/net.rb +50 -23
- data/lib/ronin/network/extensions/pop3.rb +1 -4
- data/lib/ronin/network/extensions/pop3/net.rb +40 -17
- data/lib/ronin/network/extensions/smtp.rb +1 -4
- data/lib/ronin/network/extensions/smtp/net.rb +49 -21
- data/lib/ronin/network/extensions/tcp.rb +1 -4
- data/lib/ronin/network/extensions/tcp/net.rb +234 -31
- data/lib/ronin/network/extensions/telnet.rb +1 -4
- data/lib/ronin/network/extensions/telnet/net.rb +83 -51
- data/lib/ronin/network/extensions/udp.rb +1 -4
- data/lib/ronin/network/extensions/udp/net.rb +164 -27
- data/lib/ronin/{sessions.rb → network/helpers.rb} +10 -13
- data/lib/ronin/network/helpers/esmtp.rb +129 -0
- data/lib/ronin/{sessions/session.rb → network/helpers/helper.rb} +25 -17
- data/lib/ronin/network/helpers/http.rb +444 -0
- data/lib/ronin/network/helpers/imap.rb +115 -0
- data/lib/ronin/network/helpers/pop3.rb +110 -0
- data/lib/ronin/network/helpers/smtp.rb +123 -0
- data/lib/ronin/network/helpers/tcp.rb +309 -0
- data/lib/ronin/network/helpers/telnet.rb +158 -0
- data/lib/ronin/network/helpers/udp.rb +197 -0
- data/lib/ronin/network/http.rb +3 -156
- data/lib/ronin/network/http/exceptions.rb +1 -4
- data/lib/ronin/network/http/exceptions/unknown_request.rb +1 -4
- data/lib/ronin/network/http/http.rb +214 -0
- data/lib/ronin/network/http/proxy.rb +308 -0
- data/lib/ronin/network/imap.rb +7 -6
- data/lib/ronin/network/pop3.rb +7 -6
- data/lib/ronin/network/smtp.rb +1 -4
- data/lib/ronin/network/smtp/email.rb +34 -18
- data/lib/ronin/network/smtp/smtp.rb +19 -7
- data/lib/ronin/network/tcp.rb +1 -4
- data/lib/ronin/network/telnet.rb +25 -12
- data/lib/ronin/network/udp.rb +1 -4
- data/lib/ronin/os.rb +43 -21
- data/lib/ronin/path.rb +29 -9
- data/lib/ronin/platform.rb +1 -4
- data/lib/ronin/platform/exceptions.rb +1 -4
- data/lib/ronin/platform/exceptions/extension_not_found.rb +1 -4
- data/lib/ronin/platform/exceptions/overlay_cached.rb +1 -4
- data/lib/ronin/platform/exceptions/overlay_not_found.rb +1 -4
- data/lib/ronin/platform/extension.rb +195 -52
- data/lib/ronin/platform/extension_cache.rb +60 -24
- data/lib/ronin/platform/maintainer.rb +15 -8
- data/lib/ronin/platform/object_cache.rb +29 -8
- data/lib/ronin/platform/overlay.rb +82 -26
- data/lib/ronin/platform/overlay_cache.rb +179 -56
- data/lib/ronin/platform/platform.rb +154 -58
- data/lib/ronin/platform/ronin.rb +38 -11
- data/lib/ronin/product.rb +17 -17
- data/lib/ronin/rpc.rb +1 -4
- data/lib/ronin/rpc/call.rb +1 -4
- data/lib/ronin/rpc/client.rb +1 -4
- data/lib/ronin/rpc/console.rb +1 -4
- data/lib/ronin/rpc/exceptions.rb +1 -4
- data/lib/ronin/rpc/exceptions/not_implemented.rb +1 -4
- data/lib/ronin/rpc/exceptions/response_missing.rb +1 -4
- data/lib/ronin/rpc/response.rb +1 -4
- data/lib/ronin/rpc/service.rb +1 -4
- data/lib/ronin/rpc/shell.rb +1 -4
- data/lib/ronin/scanners.rb +1 -4
- data/lib/ronin/scanners/exceptions.rb +1 -4
- data/lib/ronin/scanners/exceptions/unknown_category.rb +1 -4
- data/lib/ronin/scanners/scanner.rb +82 -26
- data/lib/ronin/static.rb +1 -4
- data/lib/ronin/static/finders.rb +1 -4
- data/lib/ronin/static/static.rb +16 -7
- data/lib/ronin/templates.rb +2 -4
- data/lib/ronin/templates/erb.rb +24 -10
- data/lib/ronin/templates/template.rb +130 -0
- data/lib/ronin/ui.rb +2 -6
- data/lib/ronin/ui/command_line.rb +1 -4
- data/lib/ronin/ui/command_line/command.rb +137 -68
- data/lib/ronin/ui/command_line/command_line.rb +52 -29
- data/lib/ronin/ui/command_line/commands/add.rb +39 -67
- data/lib/ronin/ui/command_line/commands/console.rb +23 -27
- data/lib/ronin/ui/command_line/commands/help.rb +10 -29
- data/lib/ronin/ui/command_line/commands/install.rb +31 -56
- data/lib/ronin/ui/command_line/commands/list.rb +34 -52
- data/lib/ronin/ui/command_line/commands/remove.rb +12 -32
- data/lib/ronin/ui/command_line/commands/uninstall.rb +11 -31
- data/lib/ronin/ui/command_line/commands/update.rb +15 -35
- data/lib/ronin/ui/command_line/exceptions.rb +1 -4
- data/lib/ronin/ui/command_line/exceptions/unknown_command.rb +1 -4
- data/lib/ronin/ui/console.rb +54 -23
- data/lib/ronin/ui/hexdump.rb +1 -4
- data/lib/ronin/ui/hexdump/extensions.rb +1 -4
- data/lib/ronin/ui/hexdump/extensions/file.rb +8 -6
- data/lib/ronin/ui/hexdump/extensions/kernel.rb +4 -5
- data/lib/ronin/ui/hexdump/hexdump.rb +8 -5
- data/lib/ronin/{sessions/exceptions.rb → ui/output.rb} +3 -5
- data/lib/ronin/ui/output/handler.rb +121 -0
- data/lib/ronin/ui/output/helpers.rb +110 -0
- data/lib/ronin/ui/output/output.rb +144 -0
- data/lib/ronin/ui/shell.rb +38 -12
- data/lib/ronin/version.rb +2 -5
- data/lib/ronin/{sessions/exceptions/variable_missing.rb → yard.rb} +2 -10
- data/lib/ronin/{ronin.rb → yard/handlers.rb} +5 -15
- data/lib/ronin/yard/handlers/ruby.rb +27 -0
- data/lib/ronin/yard/handlers/ruby/base.rb +27 -0
- data/lib/ronin/yard/handlers/ruby/belongs_to_handler.rb +45 -0
- data/lib/ronin/yard/handlers/ruby/eval_block_handler.rb +18 -0
- data/lib/ronin/yard/handlers/ruby/has_handler.rb +49 -0
- data/lib/ronin/yard/handlers/ruby/legacy.rb +26 -0
- data/lib/ronin/yard/handlers/ruby/legacy/belongs_to_handler.rb +41 -0
- data/lib/ronin/yard/handlers/ruby/legacy/eval_block_handler.rb +19 -0
- data/lib/ronin/yard/handlers/ruby/legacy/has_handler.rb +34 -0
- data/lib/ronin/yard/handlers/ruby/legacy/metaclass_eval_handler.rb +21 -0
- data/lib/ronin/yard/handlers/ruby/legacy/property_handler.rb +41 -0
- data/lib/ronin/yard/handlers/ruby/legacy/scanner_handler.rb +61 -0
- data/lib/ronin/yard/handlers/ruby/metaclass_eval_handler.rb +18 -0
- data/lib/ronin/yard/handlers/ruby/property_handler.rb +45 -0
- data/lib/ronin/yard/handlers/ruby/scanner_handler.rb +66 -0
- data/spec/author_spec.rb +3 -3
- data/spec/extensions/classes/some_class.rb +2 -0
- data/spec/extensions/kernel_spec.rb +17 -0
- data/spec/extensions/uri/http_spec.rb +0 -31
- data/spec/formatting/binary/integer_spec.rb +4 -0
- data/spec/formatting/text/string_spec.rb +96 -0
- data/spec/license_spec.rb +6 -6
- data/spec/model/classes/basic_model.rb +13 -0
- data/spec/model/classes/custom_model.rb +17 -0
- data/spec/model/classes/described_model.rb +10 -0
- data/spec/model/has_description_spec.rb +42 -0
- data/spec/model/has_license_spec.rb +18 -4
- data/spec/model/model_spec.rb +68 -0
- data/spec/network/helpers/classes/test_helper.rb +11 -0
- data/spec/network/helpers/classes/uses_test_helper.rb +10 -0
- data/spec/network/helpers/helper_spec.rb +25 -0
- data/spec/network/{http_spec.rb → http/http_spec.rb} +0 -0
- data/spec/network/http/proxy_spec.rb +116 -0
- data/spec/os_spec.rb +4 -4
- data/spec/platform/extension_cache_spec.rb +14 -0
- data/spec/platform/extension_spec.rb +11 -0
- data/spec/platform/platform_spec.rb +8 -0
- data/spec/product_spec.rb +9 -9
- data/spec/spec_helper.rb +1 -1
- data/spec/templates/classes/{uses_erb.rb → example_erb.rb} +1 -1
- data/spec/templates/classes/example_template.rb +21 -0
- data/spec/templates/erb_spec.rb +2 -2
- data/spec/templates/helpers/static.rb +5 -0
- data/spec/templates/helpers/static/templates/_relative.erb +1 -0
- data/spec/templates/helpers/static/templates/example.erb +1 -0
- data/spec/templates/template_spec.rb +41 -0
- data/spec/ui/command_line/classes/test_command.rb +23 -0
- data/spec/ui/command_line/command_spec.rb +31 -0
- data/spec/ui/output_spec.rb +29 -0
- data/static/ronin/platform/overlay.xsl +135 -114
- data/tasks/spec.rb +1 -0
- data/tasks/yard.rb +18 -0
- metadata +98 -59
- metadata.gz.sig +0 -0
- data/TODO.txt +0 -15
- data/lib/ronin/extensions/hash.rb +0 -62
- data/lib/ronin/sessions/esmtp.rb +0 -57
- data/lib/ronin/sessions/http.rb +0 -678
- data/lib/ronin/sessions/imap.rb +0 -54
- data/lib/ronin/sessions/pop3.rb +0 -52
- data/lib/ronin/sessions/smtp.rb +0 -57
- data/lib/ronin/sessions/tcp.rb +0 -100
- data/lib/ronin/sessions/telnet.rb +0 -55
- data/lib/ronin/sessions/udp.rb +0 -73
- data/lib/ronin/ui/command_line/options.rb +0 -136
- data/lib/ronin/ui/diagnostics.rb +0 -66
- data/lib/ronin/ui/verbose.rb +0 -58
- data/spec/extensions/hash_spec.rb +0 -38
- data/spec/sessions/classes/test_session.rb +0 -11
- data/spec/sessions/classes/uses_test_session.rb +0 -10
- data/spec/sessions/session_spec.rb +0 -25
- data/spec/ui/verbose_spec.rb +0 -17
data/lib/ronin/sessions/esmtp.rb
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
#--
|
|
3
|
-
# Ronin - A ruby development platform designed for information security
|
|
4
|
-
# and data exploration tasks.
|
|
5
|
-
#
|
|
6
|
-
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
|
-
#
|
|
8
|
-
# This program is free software; you can redistribute it and/or modify
|
|
9
|
-
# it under the terms of the GNU General Public License as published by
|
|
10
|
-
# the Free Software Foundation; either version 2 of the License, or
|
|
11
|
-
# (at your option) any later version.
|
|
12
|
-
#
|
|
13
|
-
# This program is distributed in the hope that it will be useful,
|
|
14
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
# GNU General Public License for more details.
|
|
17
|
-
#
|
|
18
|
-
# You should have received a copy of the GNU General Public License
|
|
19
|
-
# along with this program; if not, write to the Free Software
|
|
20
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
require 'ronin/sessions/session'
|
|
25
|
-
require 'ronin/network/esmtp'
|
|
26
|
-
|
|
27
|
-
module Ronin
|
|
28
|
-
module Sessions
|
|
29
|
-
module ESMTP
|
|
30
|
-
include Session
|
|
31
|
-
|
|
32
|
-
protected
|
|
33
|
-
|
|
34
|
-
def esmtp_message(options={},&block)
|
|
35
|
-
Network::SMTP.message(options,&block)
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
def esmtp_connect(options={},&block)
|
|
39
|
-
require_variable :host
|
|
40
|
-
|
|
41
|
-
options[:port] ||= @port
|
|
42
|
-
options[:login] ||= @esmtp_login
|
|
43
|
-
options[:user] ||= @esmtp_user
|
|
44
|
-
options[:password] ||= @esmtp_password
|
|
45
|
-
|
|
46
|
-
return ::Net.esmtp_connect(@host,options,&block)
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
def esmtp_session(options={},&block)
|
|
50
|
-
esmtp_connect(options) do |sess|
|
|
51
|
-
block.call(sess) if block
|
|
52
|
-
sess.close
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
data/lib/ronin/sessions/http.rb
DELETED
|
@@ -1,678 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
#--
|
|
3
|
-
# Ronin - A ruby development platform designed for information security
|
|
4
|
-
# and data exploration tasks.
|
|
5
|
-
#
|
|
6
|
-
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
|
-
#
|
|
8
|
-
# This program is free software; you can redistribute it and/or modify
|
|
9
|
-
# it under the terms of the GNU General Public License as published by
|
|
10
|
-
# the Free Software Foundation; either version 2 of the License, or
|
|
11
|
-
# (at your option) any later version.
|
|
12
|
-
#
|
|
13
|
-
# This program is distributed in the hope that it will be useful,
|
|
14
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
# GNU General Public License for more details.
|
|
17
|
-
#
|
|
18
|
-
# You should have received a copy of the GNU General Public License
|
|
19
|
-
# along with this program; if not, write to the Free Software
|
|
20
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
require 'ronin/sessions/session'
|
|
25
|
-
require 'ronin/network/http'
|
|
26
|
-
|
|
27
|
-
module Ronin
|
|
28
|
-
module Sessions
|
|
29
|
-
module HTTP
|
|
30
|
-
include Session
|
|
31
|
-
|
|
32
|
-
protected
|
|
33
|
-
|
|
34
|
-
#
|
|
35
|
-
# Resets the HTTP proxy settings.
|
|
36
|
-
#
|
|
37
|
-
def disable_http_proxy
|
|
38
|
-
@http_proxy = nil
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
#
|
|
42
|
-
# Connects to the HTTP server using the given _options_. If a _block_
|
|
43
|
-
# is given it will be passed the newly created <tt>Net::HTTP</tt>
|
|
44
|
-
# object.
|
|
45
|
-
#
|
|
46
|
-
# _options_ may contain the following keys:
|
|
47
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
48
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to the
|
|
49
|
-
# HTTP server.
|
|
50
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
51
|
-
# connecting to the HTTP server.
|
|
52
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
53
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
54
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
55
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
56
|
-
#
|
|
57
|
-
def http_session(options={},&block)
|
|
58
|
-
Net.http_session(http_merge_options(options),&block)
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
#
|
|
62
|
-
# Connects to the HTTP server and sends an HTTP Request using the
|
|
63
|
-
# given _options_. If a _block_ is given it will be passed the newly
|
|
64
|
-
# created HTTP Request object. Returns the
|
|
65
|
-
# <tt>Net::HTTP::Response</tt> that was returned.
|
|
66
|
-
#
|
|
67
|
-
# _options_ may contain the following keys:
|
|
68
|
-
# <tt>:method</tt>:: The HTTP method to use for the request.
|
|
69
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
70
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
71
|
-
# the HTTP server.
|
|
72
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
73
|
-
# connecting to the HTTP server.
|
|
74
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
75
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults
|
|
76
|
-
# to <tt>Net::HTTP.default_port</tt>.
|
|
77
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
78
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
79
|
-
# the HTTP server. Defaults to
|
|
80
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
81
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
82
|
-
# to.
|
|
83
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
84
|
-
# to.
|
|
85
|
-
# Defaults to <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
86
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
87
|
-
# when connecting to the HTTP
|
|
88
|
-
# proxy.
|
|
89
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
90
|
-
# with when connecting to the
|
|
91
|
-
# HTTP proxy.
|
|
92
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the
|
|
93
|
-
# request. May use Strings or Symbols for the
|
|
94
|
-
# keys of the Hash.
|
|
95
|
-
#
|
|
96
|
-
def http_request(options={},&block)
|
|
97
|
-
Net.http_request(http_merge_options(options),&block)
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
#
|
|
101
|
-
# Performes an HTTP Copy request with the given _options_. If a
|
|
102
|
-
# _block_ is given, it will be passed the response from the HTTP
|
|
103
|
-
# server. Returns the response from the HTTP server.
|
|
104
|
-
#
|
|
105
|
-
# _options_ may contain the following keys:
|
|
106
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
107
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
108
|
-
# the HTTP server.
|
|
109
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
110
|
-
# connecting to the HTTP server.
|
|
111
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
112
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
113
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
114
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
115
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
116
|
-
# the HTTP server. Defaults to
|
|
117
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
118
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
119
|
-
# to.
|
|
120
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
121
|
-
# to. Defaults to
|
|
122
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
123
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
124
|
-
# when connecting to the HTTP
|
|
125
|
-
# proxy.
|
|
126
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
127
|
-
# with when connecting to the
|
|
128
|
-
# HTTP proxy.
|
|
129
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
130
|
-
# Copy request. May use Strings or Symbols for the
|
|
131
|
-
# keys of the Hash.
|
|
132
|
-
#
|
|
133
|
-
def http_copy(options={},&block)
|
|
134
|
-
Net.http_copy(http_merge_options(options),&block)
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
#
|
|
138
|
-
# Performes an HTTP Delete request with the given _options_. If a
|
|
139
|
-
# _block_ is given, it will be passed the response from the HTTP
|
|
140
|
-
# server. Returns the response from the HTTP server.
|
|
141
|
-
#
|
|
142
|
-
# _options_ may contain the following keys:
|
|
143
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
144
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
145
|
-
# the HTTP server.
|
|
146
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
147
|
-
# connecting to the HTTP server.
|
|
148
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
149
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
150
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
151
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
152
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
153
|
-
# the HTTP server. Defaults to
|
|
154
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
155
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
156
|
-
# to.
|
|
157
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
158
|
-
# to. Defaults to
|
|
159
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
160
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
161
|
-
# when connecting to the HTTP
|
|
162
|
-
# proxy.
|
|
163
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
164
|
-
# with when connecting to the
|
|
165
|
-
# HTTP proxy.
|
|
166
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
167
|
-
# Delete request. May use Strings or Symbols for
|
|
168
|
-
# the keys of the Hash.
|
|
169
|
-
#
|
|
170
|
-
def http_delete(options={},&block)
|
|
171
|
-
Net.http_delete(http_merge_options(options),&block)
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
#
|
|
175
|
-
# Performes an HTTP Get request with the given _options_. If a _block_
|
|
176
|
-
# is given, it will be passed the response from the HTTP server.
|
|
177
|
-
# Returns the response from the HTTP server.
|
|
178
|
-
#
|
|
179
|
-
# _options_ may contain the following keys:
|
|
180
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
181
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
182
|
-
# the HTTP server.
|
|
183
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
184
|
-
# connecting to the HTTP server.
|
|
185
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
186
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
187
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
188
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
189
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
190
|
-
# the HTTP server. Defaults to
|
|
191
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
192
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
193
|
-
# to.
|
|
194
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
195
|
-
# to. Defaults to
|
|
196
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
197
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
198
|
-
# when connecting to the HTTP
|
|
199
|
-
# proxy.
|
|
200
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
201
|
-
# with when connecting to the
|
|
202
|
-
# HTTP proxy.
|
|
203
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
204
|
-
# Get request. May use Strings or Symbols for the
|
|
205
|
-
# keys of the Hash.
|
|
206
|
-
#
|
|
207
|
-
def http_get(options={},&block)
|
|
208
|
-
Net.http_get(http_merge_options(options),&block)
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
#
|
|
212
|
-
# Performes an HTTP Get request with the given _options_. If a _block_
|
|
213
|
-
# is given, it will be passed the response body from the HTTP server.
|
|
214
|
-
# Returns the response body from the HTTP server.
|
|
215
|
-
#
|
|
216
|
-
# _options_ may contain the following keys:
|
|
217
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
218
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
219
|
-
# the HTTP server.
|
|
220
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
221
|
-
# connecting to the HTTP server.
|
|
222
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
223
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
224
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
225
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
226
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
227
|
-
# the HTTP server. Defaults to
|
|
228
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
229
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
230
|
-
# to.
|
|
231
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
232
|
-
# to. Defaults to
|
|
233
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
234
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
235
|
-
# when connecting to the HTTP
|
|
236
|
-
# proxy.
|
|
237
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
238
|
-
# with when connecting to the
|
|
239
|
-
# HTTP proxy.
|
|
240
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
241
|
-
# Get request. May use Strings or Symbols for the
|
|
242
|
-
# keys of the Hash.
|
|
243
|
-
#
|
|
244
|
-
def http_get_body(options={},&block)
|
|
245
|
-
Net.http_get_body(http_merge_options(options),&block)
|
|
246
|
-
end
|
|
247
|
-
|
|
248
|
-
#
|
|
249
|
-
# Performes an HTTP Head request with the given _options_. If a
|
|
250
|
-
# _block_ is given, it will be passed the response from the HTTP
|
|
251
|
-
# server. Returns the response from the HTTP server.
|
|
252
|
-
#
|
|
253
|
-
# _options_ may contain the following keys:
|
|
254
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
255
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
256
|
-
# the HTTP server.
|
|
257
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
258
|
-
# connecting to the HTTP server.
|
|
259
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
260
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
261
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
262
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
263
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
264
|
-
# the HTTP server. Defaults to
|
|
265
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
266
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
267
|
-
# to.
|
|
268
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
269
|
-
# to. Defaults to
|
|
270
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
271
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
272
|
-
# when connecting to the HTTP
|
|
273
|
-
# proxy.
|
|
274
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
275
|
-
# with when connecting to the
|
|
276
|
-
# HTTP proxy.
|
|
277
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
278
|
-
# Head request. May use Strings or Symbols for the
|
|
279
|
-
# keys of the Hash.
|
|
280
|
-
#
|
|
281
|
-
def http_head(options={},&block)
|
|
282
|
-
Net.http_head(http_merge_options(options),&block)
|
|
283
|
-
end
|
|
284
|
-
|
|
285
|
-
#
|
|
286
|
-
# Performes an HTTP Lock request with the given _options_. If a
|
|
287
|
-
# _block_ is given, it will be passed the response from the HTTP
|
|
288
|
-
# server. Returns the response from the HTTP server.
|
|
289
|
-
#
|
|
290
|
-
# _options_ may contain the following keys:
|
|
291
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
292
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
293
|
-
# the HTTP server.
|
|
294
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
295
|
-
# connecting to the HTTP server.
|
|
296
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
297
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
298
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
299
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
300
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
301
|
-
# the HTTP server. Defaults to
|
|
302
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
303
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
304
|
-
# to.
|
|
305
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
306
|
-
# to. Defaults to
|
|
307
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
308
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
309
|
-
# when connecting to the HTTP
|
|
310
|
-
# proxy.
|
|
311
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
312
|
-
# with when connecting to the
|
|
313
|
-
# HTTP proxy.
|
|
314
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
315
|
-
# Lock request. May use Strings or Symbols for the
|
|
316
|
-
# keys of the Hash.
|
|
317
|
-
#
|
|
318
|
-
def http_lock(options={},&block)
|
|
319
|
-
Net.http_lock(http_merge_options(options),&block)
|
|
320
|
-
end
|
|
321
|
-
|
|
322
|
-
#
|
|
323
|
-
# Performes an HTTP Mkcol request with the given _options_. If a
|
|
324
|
-
# _block_ is given, it will be passed the response from the HTTP
|
|
325
|
-
# server. Returns the response from the HTTP server.
|
|
326
|
-
#
|
|
327
|
-
# _options_ may contain the following keys:
|
|
328
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
329
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
330
|
-
# the HTTP server.
|
|
331
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
332
|
-
# connecting to the HTTP server.
|
|
333
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
334
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
335
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
336
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
337
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
338
|
-
# the HTTP server. Defaults to
|
|
339
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
340
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
341
|
-
# to.
|
|
342
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
343
|
-
# to. Defaults to
|
|
344
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
345
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
346
|
-
# when connecting to the HTTP
|
|
347
|
-
# proxy.
|
|
348
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
349
|
-
# with when connecting to the
|
|
350
|
-
# HTTP proxy.
|
|
351
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
352
|
-
# Mkcol request. May use Strings or Symbols for
|
|
353
|
-
# the keys of the Hash.
|
|
354
|
-
#
|
|
355
|
-
def http_mkcol(options={},&block)
|
|
356
|
-
Net.http_mkcol(http_merge_options(options),&block)
|
|
357
|
-
end
|
|
358
|
-
|
|
359
|
-
#
|
|
360
|
-
# Performes an HTTP Move request with the given _options_. If a
|
|
361
|
-
# _block_ is given, it will be passed the response from the HTTP
|
|
362
|
-
# server. Returns the response from the HTTP server.
|
|
363
|
-
#
|
|
364
|
-
# _options_ may contain the following keys:
|
|
365
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
366
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
367
|
-
# the HTTP server.
|
|
368
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
369
|
-
# connecting to the HTTP server.
|
|
370
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
371
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
372
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
373
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
374
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
375
|
-
# the HTTP server. Defaults to
|
|
376
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
377
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
378
|
-
# to.
|
|
379
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
380
|
-
# to. Defaults to
|
|
381
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
382
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
383
|
-
# when connecting to the HTTP
|
|
384
|
-
# proxy.
|
|
385
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
386
|
-
# with when connecting to the
|
|
387
|
-
# HTTP proxy.
|
|
388
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
389
|
-
# Move request. May use Strings or Symbols for the
|
|
390
|
-
# keys of the Hash.
|
|
391
|
-
#
|
|
392
|
-
def http_move(options={},&block)
|
|
393
|
-
Net.http_move(http_merge_options(options),&block)
|
|
394
|
-
end
|
|
395
|
-
|
|
396
|
-
#
|
|
397
|
-
# Performes an HTTP Options request with the given _options_. If a
|
|
398
|
-
# _block_ is given, it will be passed the response from the HTTP
|
|
399
|
-
# server. Returns the response from the HTTP server.
|
|
400
|
-
#
|
|
401
|
-
# _options_ may contain the following keys:
|
|
402
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
403
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
404
|
-
# the HTTP server.
|
|
405
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
406
|
-
# connecting to the HTTP server.
|
|
407
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
408
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
409
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
410
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
411
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
412
|
-
# the HTTP server. Defaults to
|
|
413
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
414
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
415
|
-
# to.
|
|
416
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
417
|
-
# to. Defaults to
|
|
418
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
419
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
420
|
-
# when connecting to the HTTP
|
|
421
|
-
# proxy.
|
|
422
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
423
|
-
# with when connecting to the
|
|
424
|
-
# HTTP proxy.
|
|
425
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
426
|
-
# Options request. May use Strings or Symbols for
|
|
427
|
-
# the keys of the Hash.
|
|
428
|
-
#
|
|
429
|
-
def http_options(options={},&block)
|
|
430
|
-
Net.http_options(http_merge_options(options),&block)
|
|
431
|
-
end
|
|
432
|
-
|
|
433
|
-
#
|
|
434
|
-
# Performes an HTTP Post request with the given _options_. If a
|
|
435
|
-
# _block_ is given, it will be passed the response from the HTTP
|
|
436
|
-
# server. Returns the response from the HTTP server.
|
|
437
|
-
#
|
|
438
|
-
# _options_ may contain the following keys:
|
|
439
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
440
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
441
|
-
# the HTTP server.
|
|
442
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
443
|
-
# connecting to the HTTP server.
|
|
444
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
445
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
446
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
447
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
448
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
449
|
-
# the HTTP server. Defaults to
|
|
450
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
451
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
452
|
-
# to.
|
|
453
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
454
|
-
# to. Defaults to
|
|
455
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
456
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
457
|
-
# when connecting to the HTTP
|
|
458
|
-
# proxy.
|
|
459
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
460
|
-
# with when connecting to the
|
|
461
|
-
# HTTP proxy.
|
|
462
|
-
# <tt>:post_data</tt>:: The POSTDATA to send with the HTTP Post
|
|
463
|
-
# request.
|
|
464
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
465
|
-
# Post request. May use Strings or Symbols for the
|
|
466
|
-
# keys of the Hash.
|
|
467
|
-
#
|
|
468
|
-
def http_post(options={},&block)
|
|
469
|
-
Net.http_post(http_merge_options(options),&block)
|
|
470
|
-
end
|
|
471
|
-
|
|
472
|
-
#
|
|
473
|
-
# Performes an HTTP Post request with the given _options_. If a
|
|
474
|
-
# _block_ is given, it will be passed the response body from the HTTP
|
|
475
|
-
# server. Returns the response body from the HTTP server.
|
|
476
|
-
#
|
|
477
|
-
# _options_ may contain the following keys:
|
|
478
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
479
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
480
|
-
# the HTTP server.
|
|
481
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
482
|
-
# connecting to the HTTP server.
|
|
483
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
484
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
485
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
486
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
487
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
488
|
-
# the HTTP server. Defaults to
|
|
489
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
490
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
491
|
-
# to.
|
|
492
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
493
|
-
# to. Defaults to
|
|
494
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
495
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
496
|
-
# when connecting to the HTTP
|
|
497
|
-
# proxy.
|
|
498
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
499
|
-
# with when connecting to the
|
|
500
|
-
# HTTP proxy.
|
|
501
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
502
|
-
# Post request. May use Strings or Symbols for the
|
|
503
|
-
# keys of the Hash.
|
|
504
|
-
#
|
|
505
|
-
def http_post_body(options={},&block)
|
|
506
|
-
Net.http_post_body(http_merge_options(options),&block)
|
|
507
|
-
end
|
|
508
|
-
|
|
509
|
-
#
|
|
510
|
-
# Performes an HTTP Propfind request with the given _options_. If a
|
|
511
|
-
# _block_ is given, it will be passed the response from the HTTP
|
|
512
|
-
# server. Returns the response from the HTTP server.
|
|
513
|
-
#
|
|
514
|
-
# _options_ may contain the following keys:
|
|
515
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
516
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
517
|
-
# the HTTP server.
|
|
518
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
519
|
-
# connecting to the HTTP server.
|
|
520
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
521
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
522
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
523
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
524
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
525
|
-
# the HTTP server. Defaults to
|
|
526
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
527
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
528
|
-
# to.
|
|
529
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
530
|
-
# to. Defaults to
|
|
531
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
532
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
533
|
-
# when connecting to the HTTP
|
|
534
|
-
# proxy.
|
|
535
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
536
|
-
# with when connecting to the
|
|
537
|
-
# HTTP proxy.
|
|
538
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
539
|
-
# Propfind request. May use Strings or Symbols for
|
|
540
|
-
# the keys of the Hash.
|
|
541
|
-
#
|
|
542
|
-
def http_prop_find(options={},&block)
|
|
543
|
-
Net.http_prop_find(http_merge_options(options),&block)
|
|
544
|
-
end
|
|
545
|
-
|
|
546
|
-
#
|
|
547
|
-
# Performes an HTTP Proppatch request with the given _options_. If a
|
|
548
|
-
# _block_ is given, it will be passed the response from the HTTP
|
|
549
|
-
# server. Returns the response from the HTTP server.
|
|
550
|
-
#
|
|
551
|
-
# _options_ may contain the following keys:
|
|
552
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
553
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
554
|
-
# the HTTP server.
|
|
555
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
556
|
-
# connecting to the HTTP server.
|
|
557
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
558
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
559
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
560
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
561
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
562
|
-
# the HTTP server. Defaults to
|
|
563
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
564
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
565
|
-
# to.
|
|
566
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
567
|
-
# to. Defaults to
|
|
568
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
569
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
570
|
-
# when connecting to the HTTP
|
|
571
|
-
# proxy.
|
|
572
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
573
|
-
# with when connecting to the
|
|
574
|
-
# HTTP proxy.
|
|
575
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
576
|
-
# Proppatch request. May use Strings or Symbols
|
|
577
|
-
# for the keys of the Hash.
|
|
578
|
-
#
|
|
579
|
-
def http_prop_patch(options={},&block)
|
|
580
|
-
Net.http_prop_patch(http_merge_options(options),&block)
|
|
581
|
-
end
|
|
582
|
-
|
|
583
|
-
#
|
|
584
|
-
# Performes an HTTP Trace request with the given _options_. If a
|
|
585
|
-
# _block_ is given, it will be passed the response from the HTTP
|
|
586
|
-
# server. Returns the response from the HTTP server.
|
|
587
|
-
#
|
|
588
|
-
# _options_ may contain the following keys:
|
|
589
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
590
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
591
|
-
# the HTTP server.
|
|
592
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
593
|
-
# connecting to the HTTP server.
|
|
594
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
595
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
596
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
597
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
598
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
599
|
-
# the HTTP server. Defaults to
|
|
600
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
601
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
602
|
-
# to.
|
|
603
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
604
|
-
# to. Defaults to
|
|
605
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
606
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
607
|
-
# when connecting to the HTTP
|
|
608
|
-
# proxy.
|
|
609
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
610
|
-
# with when connecting to the
|
|
611
|
-
# HTTP proxy.
|
|
612
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
613
|
-
# Trace request. May use Strings or Symbols for
|
|
614
|
-
# the keys of the Hash.
|
|
615
|
-
#
|
|
616
|
-
def http_trace(options={},&block)
|
|
617
|
-
Net.http_trace(http_merge_options(options),&block)
|
|
618
|
-
end
|
|
619
|
-
|
|
620
|
-
#
|
|
621
|
-
# Performes an HTTP Unlock request with the given _options_. If a
|
|
622
|
-
# _block_ is given, it will be passed the response from the HTTP
|
|
623
|
-
# server. Returns the response from the HTTP server.
|
|
624
|
-
#
|
|
625
|
-
# _options_ may contain the following keys:
|
|
626
|
-
# <tt>:url</tt>:: The full URL to request.
|
|
627
|
-
# <tt>:user</tt>:: The user to authenticate with when connecting to
|
|
628
|
-
# the HTTP server.
|
|
629
|
-
# <tt>:password</tt>:: The password to authenticate with when
|
|
630
|
-
# connecting to the HTTP server.
|
|
631
|
-
# <tt>:host</tt>:: The host the HTTP server is running on.
|
|
632
|
-
# <tt>:port</tt>:: The port the HTTP server is running on. Defaults to
|
|
633
|
-
# <tt>Net::HTTP.default_port</tt>.
|
|
634
|
-
# <tt>:path</tt>:: The path to request from the HTTP server.
|
|
635
|
-
# <tt>:proxy</tt>:: A Hash of proxy settings to use when connecting to
|
|
636
|
-
# the HTTP server. Defaults to
|
|
637
|
-
# <tt>Ronin::Network::HTTP.proxy</tt>.
|
|
638
|
-
# <tt>:host</tt>:: The HTTP proxy host to connect
|
|
639
|
-
# to.
|
|
640
|
-
# <tt>:port</tt>:: The HTTP proxy port to connect
|
|
641
|
-
# to. Defaults to
|
|
642
|
-
# <tt>Ronin::Network::HTTP.default_proxy_port</tt>.
|
|
643
|
-
# <tt>:user</tt>:: The user to authenticate with
|
|
644
|
-
# when connecting to the HTTP
|
|
645
|
-
# proxy.
|
|
646
|
-
# <tt>:password</tt>:: The password to authenticate
|
|
647
|
-
# with when connecting to the
|
|
648
|
-
# HTTP proxy.
|
|
649
|
-
# <tt>:headers</tt>:: A Hash of the HTTP Headers to send with the HTTP
|
|
650
|
-
# Unlock request. May use Strings or Symbols for
|
|
651
|
-
# the keys of the Hash.
|
|
652
|
-
#
|
|
653
|
-
def http_unlock(options={},&block)
|
|
654
|
-
Net.http_unlock(http_merge_options(options),&block)
|
|
655
|
-
end
|
|
656
|
-
|
|
657
|
-
private
|
|
658
|
-
|
|
659
|
-
def http_merge_options(options={})
|
|
660
|
-
options[:host] ||= @host if @host
|
|
661
|
-
options[:port] ||= @port if @port
|
|
662
|
-
|
|
663
|
-
options[:headers] ||= {}
|
|
664
|
-
headers = options[:headers]
|
|
665
|
-
|
|
666
|
-
headers[:host] ||= @http_vhost if @http_vhost
|
|
667
|
-
|
|
668
|
-
options[:user] ||= @http_user if @http_user
|
|
669
|
-
options[:password] ||= @http_password if @http_password
|
|
670
|
-
|
|
671
|
-
options[:proxy] ||= @http_proxy if @http_proxy
|
|
672
|
-
options[:user_agent] ||= @http_user_agent if @http_user_agent
|
|
673
|
-
|
|
674
|
-
return options
|
|
675
|
-
end
|
|
676
|
-
end
|
|
677
|
-
end
|
|
678
|
-
end
|