mechanize 0.3.1 → 0.4.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/README +32 -0
- data/doc/classes/Net/HTTP.html +1716 -0
- data/doc/classes/Net/HTTP.src/M000103.html +18 -0
- data/doc/classes/Net/HTTP.src/M000104.html +18 -0
- data/doc/classes/Net/HTTP.src/M000105.html +18 -0
- data/doc/classes/Net/HTTP.src/M000106.html +18 -0
- data/doc/classes/Net/HTTP.src/M000107.html +29 -0
- data/doc/classes/Net/HTTP.src/M000108.html +18 -0
- data/doc/classes/Net/HTTP.src/M000109.html +22 -0
- data/doc/classes/Net/HTTP.src/M000110.html +18 -0
- data/doc/classes/Net/HTTP.src/M000111.html +18 -0
- data/doc/classes/Net/HTTP.src/M000112.html +18 -0
- data/doc/classes/Net/HTTP.src/M000113.html +18 -0
- data/doc/classes/Net/HTTP.src/M000114.html +22 -0
- data/doc/classes/Net/HTTP.src/M000115.html +29 -0
- data/doc/classes/Net/HTTP.src/M000116.html +18 -0
- data/doc/classes/Net/HTTP.src/M000117.html +19 -0
- data/doc/classes/Net/HTTP.src/M000118.html +19 -0
- data/doc/classes/Net/HTTP.src/M000119.html +18 -0
- data/doc/classes/Net/HTTP.src/M000121.html +18 -0
- data/doc/classes/Net/HTTP.src/M000122.html +28 -0
- data/doc/classes/Net/HTTP.src/M000123.html +19 -0
- data/doc/classes/Net/HTTP.src/M000124.html +30 -0
- data/doc/classes/Net/HTTP.src/M000125.html +18 -0
- data/doc/classes/Net/HTTP.src/M000126.html +18 -0
- data/doc/classes/Net/HTTP.src/M000127.html +18 -0
- data/doc/classes/Net/HTTP.src/M000128.html +18 -0
- data/doc/classes/Net/HTTP.src/M000129.html +18 -0
- data/doc/classes/Net/HTTP.src/M000130.html +18 -0
- data/doc/classes/Net/HTTP.src/M000133.html +28 -0
- data/doc/classes/Net/HTTP.src/M000134.html +20 -0
- data/doc/classes/Net/HTTP.src/M000135.html +28 -0
- data/doc/classes/Net/HTTP.src/M000136.html +18 -0
- data/doc/classes/Net/HTTP.src/M000137.html +18 -0
- data/doc/classes/Net/HTTP.src/M000138.html +18 -0
- data/doc/classes/Net/HTTP.src/M000139.html +18 -0
- data/doc/classes/Net/HTTP.src/M000140.html +18 -0
- data/doc/classes/Net/HTTP.src/M000141.html +18 -0
- data/doc/classes/Net/HTTP.src/M000142.html +18 -0
- data/doc/classes/Net/HTTP.src/M000143.html +18 -0
- data/doc/classes/Net/HTTP.src/M000144.html +18 -0
- data/doc/classes/Net/HTTP.src/M000145.html +18 -0
- data/doc/classes/Net/HTTP.src/M000146.html +18 -0
- data/doc/classes/Net/HTTP.src/M000147.html +18 -0
- data/doc/classes/Net/HTTP.src/M000148.html +18 -0
- data/doc/classes/Net/HTTP.src/M000152.html +19 -0
- data/doc/classes/Net/HTTP.src/M000153.html +39 -0
- data/doc/classes/Net/HTTP.src/M000154.html +18 -0
- data/doc/classes/Net/HTTP.src/M000156.html +24 -0
- data/doc/classes/Net/HTTP.src/M000157.html +18 -0
- data/doc/classes/Net/HTTP.src/M000158.html +19 -0
- data/doc/classes/Net/HTTP.src/M000159.html +21 -0
- data/doc/classes/Net/HTTP.src/M000161.html +19 -0
- data/doc/classes/Net/HTTP/Copy.html +134 -0
- data/doc/classes/Net/HTTP/Delete.html +134 -0
- data/doc/classes/Net/HTTP/Get.html +134 -0
- data/doc/classes/Net/HTTP/Head.html +134 -0
- data/doc/classes/Net/HTTP/Lock.html +134 -0
- data/doc/classes/Net/HTTP/Mkcol.html +134 -0
- data/doc/classes/Net/HTTP/Move.html +134 -0
- data/doc/classes/Net/HTTP/Options.html +134 -0
- data/doc/classes/Net/HTTP/Post.html +134 -0
- data/doc/classes/Net/HTTP/Propfind.html +134 -0
- data/doc/classes/Net/HTTP/Proppatch.html +134 -0
- data/doc/classes/Net/HTTP/Put.html +134 -0
- data/doc/classes/Net/HTTP/Trace.html +134 -0
- data/doc/classes/Net/HTTP/Unlock.html +134 -0
- data/doc/classes/Net/HTTPError.html +120 -0
- data/doc/classes/Net/HTTPExceptions.html +137 -0
- data/doc/classes/Net/HTTPFatalError.html +120 -0
- data/doc/classes/Net/HTTPGenericRequest.html +274 -0
- data/doc/classes/Net/HTTPGenericRequest.src/M000088.html +26 -0
- data/doc/classes/Net/HTTPGenericRequest.src/M000089.html +18 -0
- data/doc/classes/Net/HTTPGenericRequest.src/M000090.html +18 -0
- data/doc/classes/Net/HTTPGenericRequest.src/M000091.html +18 -0
- data/doc/classes/Net/HTTPGenericRequest.src/M000092.html +19 -0
- data/doc/classes/Net/HTTPGenericRequest.src/M000093.html +20 -0
- data/doc/classes/Net/HTTPGenericRequest.src/M000094.html +20 -0
- data/doc/classes/Net/HTTPHeader.html +734 -0
- data/doc/classes/Net/HTTPHeader.src/M000055.html +23 -0
- data/doc/classes/Net/HTTPHeader.src/M000056.html +19 -0
- data/doc/classes/Net/HTTPHeader.src/M000057.html +22 -0
- data/doc/classes/Net/HTTPHeader.src/M000058.html +22 -0
- data/doc/classes/Net/HTTPHeader.src/M000059.html +19 -0
- data/doc/classes/Net/HTTPHeader.src/M000060.html +19 -0
- data/doc/classes/Net/HTTPHeader.src/M000061.html +20 -0
- data/doc/classes/Net/HTTPHeader.src/M000063.html +18 -0
- data/doc/classes/Net/HTTPHeader.src/M000065.html +20 -0
- data/doc/classes/Net/HTTPHeader.src/M000066.html +20 -0
- data/doc/classes/Net/HTTPHeader.src/M000067.html +18 -0
- data/doc/classes/Net/HTTPHeader.src/M000068.html +18 -0
- data/doc/classes/Net/HTTPHeader.src/M000069.html +18 -0
- data/doc/classes/Net/HTTPHeader.src/M000070.html +20 -0
- data/doc/classes/Net/HTTPHeader.src/M000072.html +30 -0
- data/doc/classes/Net/HTTPHeader.src/M000073.html +43 -0
- data/doc/classes/Net/HTTPHeader.src/M000075.html +21 -0
- data/doc/classes/Net/HTTPHeader.src/M000076.html +22 -0
- data/doc/classes/Net/HTTPHeader.src/M000077.html +20 -0
- data/doc/classes/Net/HTTPHeader.src/M000078.html +21 -0
- data/doc/classes/Net/HTTPHeader.src/M000079.html +19 -0
- data/doc/classes/Net/HTTPHeader.src/M000080.html +18 -0
- data/doc/classes/Net/HTTPHeader.src/M000081.html +19 -0
- data/doc/classes/Net/HTTPHeader.src/M000082.html +19 -0
- data/doc/classes/Net/HTTPHeader.src/M000083.html +23 -0
- data/doc/classes/Net/HTTPHeader.src/M000084.html +18 -0
- data/doc/classes/Net/HTTPHeader.src/M000086.html +18 -0
- data/doc/classes/Net/HTTPHeader.src/M000087.html +18 -0
- data/doc/classes/Net/HTTPRequest.html +150 -0
- data/doc/classes/Net/HTTPRequest.src/M000102.html +21 -0
- data/doc/classes/Net/HTTPResponse.html +425 -0
- data/doc/classes/Net/HTTPResponse.src/M000162.html +18 -0
- data/doc/classes/Net/HTTPResponse.src/M000163.html +18 -0
- data/doc/classes/Net/HTTPResponse.src/M000164.html +23 -0
- data/doc/classes/Net/HTTPResponse.src/M000165.html +18 -0
- data/doc/classes/Net/HTTPResponse.src/M000166.html +32 -0
- data/doc/classes/Net/HTTPResponse.src/M000167.html +18 -0
- data/doc/classes/Net/HTTPRetriableError.html +120 -0
- data/doc/classes/Net/HTTPServerException.html +120 -0
- data/doc/classes/Net/ProtoAuthError.html +113 -0
- data/doc/classes/Net/ProtoCommandError.html +113 -0
- data/doc/classes/Net/ProtoFatalError.html +113 -0
- data/doc/classes/Net/ProtoRetriableError.html +113 -0
- data/doc/classes/Net/ProtoServerError.html +113 -0
- data/doc/classes/Net/ProtoSyntaxError.html +113 -0
- data/doc/classes/Net/ProtoUnknownError.html +113 -0
- data/doc/classes/Net/ProtocolError.html +111 -0
- data/doc/classes/Net/WriteAdapter.html +235 -0
- data/doc/classes/Net/WriteAdapter.src/M000095.html +19 -0
- data/doc/classes/Net/WriteAdapter.src/M000096.html +18 -0
- data/doc/classes/Net/WriteAdapter.src/M000097.html +18 -0
- data/doc/classes/Net/WriteAdapter.src/M000099.html +19 -0
- data/doc/classes/Net/WriteAdapter.src/M000100.html +18 -0
- data/doc/classes/Net/WriteAdapter.src/M000101.html +18 -0
- data/doc/classes/REXML.html +109 -0
- data/doc/classes/REXML/Comment.html +137 -0
- data/doc/classes/REXML/Comment.src/M000053.html +18 -0
- data/doc/classes/REXML/Node.html +240 -0
- data/doc/classes/REXML/Node.src/M000047.html +21 -0
- data/doc/classes/REXML/Node.src/M000048.html +21 -0
- data/doc/classes/REXML/Node.src/M000049.html +22 -0
- data/doc/classes/REXML/Node.src/M000050.html +18 -0
- data/doc/classes/REXML/Node.src/M000051.html +18 -0
- data/doc/classes/REXML/Node.src/M000052.html +18 -0
- data/doc/classes/REXML/Text.html +137 -0
- data/doc/classes/REXML/Text.src/M000054.html +18 -0
- data/doc/classes/WWW.html +130 -0
- data/doc/classes/WWW/Button.html +190 -0
- data/doc/classes/WWW/Button.src/M000028.html +18 -0
- data/doc/classes/WWW/Button.src/M000029.html +18 -0
- data/doc/classes/WWW/Button.src/M000030.html +25 -0
- data/doc/classes/WWW/CheckBox.html +160 -0
- data/doc/classes/WWW/CheckBox.src/M000024.html +18 -0
- data/doc/classes/WWW/Cookie.html +207 -0
- data/doc/classes/WWW/Cookie.src/M000032.html +59 -0
- data/doc/classes/WWW/Cookie.src/M000033.html +21 -0
- data/doc/classes/WWW/Cookie.src/M000034.html +18 -0
- data/doc/classes/WWW/CookieJar.html +197 -0
- data/doc/classes/WWW/CookieJar.src/M000008.html +18 -0
- data/doc/classes/WWW/CookieJar.src/M000009.html +22 -0
- data/doc/classes/WWW/CookieJar.src/M000010.html +33 -0
- data/doc/classes/WWW/CookieJar.src/M000011.html +18 -0
- data/doc/classes/WWW/Field.html +174 -0
- data/doc/classes/WWW/Field.src/M000045.html +18 -0
- data/doc/classes/WWW/Field.src/M000046.html +26 -0
- data/doc/classes/WWW/FileUpload.html +163 -0
- data/doc/classes/WWW/FileUpload.src/M000031.html +19 -0
- data/doc/classes/WWW/Form.html +152 -0
- data/doc/classes/WWW/Form.src/M000044.html +19 -0
- data/doc/classes/WWW/GlobalForm.html +271 -0
- data/doc/classes/WWW/GlobalForm.src/M000004.html +24 -0
- data/doc/classes/WWW/GlobalForm.src/M000005.html +26 -0
- data/doc/classes/WWW/GlobalForm.src/M000006.html +46 -0
- data/doc/classes/WWW/GlobalForm.src/M000007.html +46 -0
- data/doc/classes/WWW/ImageButton.html +157 -0
- data/doc/classes/WWW/ImageButton.src/M000027.html +22 -0
- data/doc/classes/WWW/Link.html +160 -0
- data/doc/classes/WWW/Link.src/M000025.html +20 -0
- data/doc/classes/WWW/Mechanize.html +379 -0
- data/doc/classes/WWW/Mechanize.src/M000013.html +21 -0
- data/doc/classes/WWW/Mechanize.src/M000014.html +18 -0
- data/doc/classes/WWW/Mechanize.src/M000015.html +24 -0
- data/doc/classes/WWW/Mechanize.src/M000016.html +19 -0
- data/doc/classes/WWW/Mechanize.src/M000017.html +23 -0
- data/doc/classes/WWW/Mechanize.src/M000018.html +32 -0
- data/doc/classes/WWW/Mechanize.src/M000019.html +19 -0
- data/doc/classes/WWW/Mechanize.src/M000020.html +18 -0
- data/doc/classes/WWW/Mechanize.src/M000021.html +33 -0
- data/doc/classes/WWW/Mechanize.src/M000022.html +18 -0
- data/doc/classes/WWW/Meta.html +113 -0
- data/doc/classes/WWW/Page.html +313 -0
- data/doc/classes/WWW/Page.src/M000036.html +18 -0
- data/doc/classes/WWW/Page.src/M000037.html +18 -0
- data/doc/classes/WWW/Page.src/M000038.html +18 -0
- data/doc/classes/WWW/Page.src/M000039.html +19 -0
- data/doc/classes/WWW/Page.src/M000040.html +19 -0
- data/doc/classes/WWW/Page.src/M000041.html +19 -0
- data/doc/classes/WWW/Page.src/M000042.html +19 -0
- data/doc/classes/WWW/Page.src/M000043.html +19 -0
- data/doc/classes/WWW/RadioButton.html +160 -0
- data/doc/classes/WWW/RadioButton.src/M000012.html +18 -0
- data/doc/classes/WWW/ResponseCodeError.html +150 -0
- data/doc/classes/WWW/ResponseCodeError.src/M000035.html +18 -0
- data/doc/classes/WWW/SelectList.html +160 -0
- data/doc/classes/WWW/SelectList.src/M000026.html +28 -0
- data/doc/created.rid +1 -0
- data/doc/files/CHANGELOG.html +136 -0
- data/doc/files/LICENSE.html +531 -0
- data/doc/files/README.html +161 -0
- data/doc/files/lib/mechanize/cookie_rb.html +101 -0
- data/doc/files/lib/mechanize/net-overrides/net/http_rb.html +139 -0
- data/doc/files/lib/mechanize/net-overrides/net/https_rb.html +109 -0
- data/doc/files/lib/mechanize/net-overrides/net/protocol_rb.html +117 -0
- data/doc/files/lib/mechanize/parsing_rb.html +267 -0
- data/doc/files/lib/mechanize/parsing_rb.src/M000001.html +22 -0
- data/doc/files/lib/mechanize/parsing_rb.src/M000002.html +44 -0
- data/doc/files/lib/mechanize/parsing_rb.src/M000003.html +34 -0
- data/doc/files/lib/mechanize_rb.html +152 -0
- data/doc/fr_class_index.html +80 -0
- data/doc/fr_file_index.html +35 -0
- data/doc/fr_method_index.html +194 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/mechanize.rb +128 -26
- data/lib/mechanize/cookie.rb +98 -0
- data/lib/mechanize/net-overrides/net/http.rb +2 -2
- data/test/README +7 -0
- data/test/htdocs/find_link.html +40 -0
- data/test/htdocs/form_test.html +154 -0
- data/test/htdocs/google.html +13 -0
- data/test/htdocs/index.html +6 -0
- data/test/server.rb +19 -0
- data/test/servlets.rb +130 -0
- data/test/tc_cookies.rb +125 -0
- data/test/tc_forms.rb +339 -0
- data/test/tc_links.rb +25 -0
- data/test/tc_mech.rb +70 -0
- data/test/tc_response_code.rb +31 -0
- data/test/ts_mech.rb +9 -0
- metadata +310 -41
- data/Rakefile +0 -14
- data/examples/rubyforge.rb +0 -13
- data/mechanize.gemspec +0 -22
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>send_request (Net::HTTP)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mechanize/net-overrides/net/http.rb, line 901</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_request</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">data</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">header</span> = <span class="ruby-keyword kw">nil</span>)
|
|
15
|
+
<span class="ruby-identifier">r</span> = <span class="ruby-constant">HTTPGenericRequest</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>,(<span class="ruby-identifier">data</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>),<span class="ruby-keyword kw">true</span>,<span class="ruby-identifier">path</span>,<span class="ruby-identifier">header</span>)
|
|
16
|
+
<span class="ruby-identifier">request</span> <span class="ruby-identifier">r</span>, <span class="ruby-identifier">data</span>
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>request (Net::HTTP)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mechanize/net-overrides/net/http.rb, line 919</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">request</span>(<span class="ruby-identifier">req</span>, <span class="ruby-identifier">body</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>) <span class="ruby-comment cmt"># :yield: +response+</span>
|
|
15
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">started?</span>
|
|
16
|
+
<span class="ruby-identifier">start</span> {
|
|
17
|
+
<span class="ruby-identifier">req</span>[<span class="ruby-value str">'connection'</span>] <span class="ruby-operator">||=</span> <span class="ruby-value str">'close'</span>
|
|
18
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">request</span>(<span class="ruby-identifier">req</span>, <span class="ruby-identifier">body</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
19
|
+
}
|
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
|
21
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">proxy_user</span>()
|
|
22
|
+
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">proxy_basic_auth</span> <span class="ruby-identifier">proxy_user</span>(), <span class="ruby-identifier">proxy_pass</span>()
|
|
23
|
+
<span class="ruby-keyword kw">end</span>
|
|
24
|
+
|
|
25
|
+
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">set_body_internal</span> <span class="ruby-identifier">body</span>
|
|
26
|
+
<span class="ruby-identifier">begin_transport</span> <span class="ruby-identifier">req</span>
|
|
27
|
+
<span class="ruby-identifier">req</span>.<span class="ruby-identifier">exec</span> <span class="ruby-ivar">@socket</span>, <span class="ruby-ivar">@curr_http_version</span>, <span class="ruby-identifier">edit_path</span>(<span class="ruby-identifier">req</span>.<span class="ruby-identifier">path</span>)
|
|
28
|
+
<span class="ruby-keyword kw">begin</span>
|
|
29
|
+
<span class="ruby-identifier">res</span> = <span class="ruby-constant">HTTPResponse</span>.<span class="ruby-identifier">read_new</span>(<span class="ruby-ivar">@socket</span>)
|
|
30
|
+
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">res</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">HTTPContinue</span>)
|
|
31
|
+
<span class="ruby-identifier">res</span>.<span class="ruby-identifier">reading_body</span>(<span class="ruby-ivar">@socket</span>, <span class="ruby-identifier">req</span>.<span class="ruby-identifier">response_body_permitted?</span>) {
|
|
32
|
+
<span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">res</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
|
33
|
+
}
|
|
34
|
+
<span class="ruby-identifier">end_transport</span> <span class="ruby-identifier">req</span>, <span class="ruby-identifier">res</span>
|
|
35
|
+
|
|
36
|
+
<span class="ruby-identifier">res</span>
|
|
37
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>use_ssl? (Net::HTTP)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mechanize/net-overrides/net/https.rb, line 108</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">use_ssl?</span>
|
|
15
|
+
<span class="ruby-ivar">@use_ssl</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>use_ssl= (Net::HTTP)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mechanize/net-overrides/net/https.rb, line 118</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">use_ssl=</span>(<span class="ruby-identifier">flag</span>)
|
|
15
|
+
<span class="ruby-identifier">flag</span> = (<span class="ruby-identifier">flag</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>)
|
|
16
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">IOError</span>, <span class="ruby-value str">"use_ssl value changed, but session already started"</span> \
|
|
17
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">started?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@use_ssl</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">flag</span>
|
|
18
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">flag</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@ssl_context</span>
|
|
19
|
+
<span class="ruby-ivar">@ssl_context</span> = <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">SSL</span><span class="ruby-operator">::</span><span class="ruby-constant">SSLContext</span>.<span class="ruby-identifier">new</span>
|
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
|
21
|
+
<span class="ruby-ivar">@use_ssl</span> = <span class="ruby-identifier">flag</span>
|
|
22
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
23
|
+
</body>
|
|
24
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>ssl_context_accessor (Net::HTTP)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mechanize/net-overrides/net/https.rb, line 128</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ssl_context_accessor</span>(<span class="ruby-identifier">name</span>)
|
|
15
|
+
<span class="ruby-identifier">module_eval</span>(<span class="ruby-value str">"def \#{name}\nreturn nil unless @ssl_context\n@ssl_context.\#{name}\nend\n\ndef \#{name}=(val)\n@ssl_context ||= OpenSSL::SSL::SSLContext.new\n@ssl_context.\#{name} = val\nend\n"</span>, <span class="ruby-keyword kw">__FILE__</span>, <span class="ruby-keyword kw">__LINE__</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>ssl_timeout (Net::HTTP)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mechanize/net-overrides/net/https.rb, line 152</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ssl_timeout</span>
|
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@ssl_context</span>
|
|
16
|
+
<span class="ruby-ivar">@ssl_context</span>.<span class="ruby-identifier">timeout</span>
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>ssl_timeout= (Net::HTTP)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mechanize/net-overrides/net/https.rb, line 157</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ssl_timeout=</span>(<span class="ruby-identifier">sec</span>)
|
|
15
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'Net::HTTP#ssl_timeout= called but use_ssl=false'</span> \
|
|
16
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">use_ssl?</span>
|
|
17
|
+
<span class="ruby-ivar">@ssl_context</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">SSL</span><span class="ruby-operator">::</span><span class="ruby-constant">SSLContext</span>.<span class="ruby-identifier">new</span>
|
|
18
|
+
<span class="ruby-ivar">@ssl_context</span>.<span class="ruby-identifier">timeout</span> = <span class="ruby-identifier">sec</span>
|
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
20
|
+
</body>
|
|
21
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>peer_cert (Net::HTTP)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/mechanize/net-overrides/net/https.rb, line 166</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">peer_cert</span>
|
|
15
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">use_ssl?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@socket</span>
|
|
16
|
+
<span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">io</span>.<span class="ruby-identifier">peer_cert</span>
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>Class: Net::HTTP::Copy</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="classHeader">
|
|
50
|
+
<table class="header-table">
|
|
51
|
+
<tr class="top-aligned-row">
|
|
52
|
+
<td><strong>Class</strong></td>
|
|
53
|
+
<td class="class-name-in-header">Net::HTTP::Copy</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../../files/lib/mechanize/net-overrides/net/http_rb.html">
|
|
59
|
+
lib/mechanize/net-overrides/net/http.rb
|
|
60
|
+
</a>
|
|
61
|
+
<br />
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
|
|
65
|
+
<tr class="top-aligned-row">
|
|
66
|
+
<td><strong>Parent:</strong></td>
|
|
67
|
+
<td>
|
|
68
|
+
HTTPRequest
|
|
69
|
+
</td>
|
|
70
|
+
</tr>
|
|
71
|
+
</table>
|
|
72
|
+
</div>
|
|
73
|
+
<!-- banner header -->
|
|
74
|
+
|
|
75
|
+
<div id="bodyContent">
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<div id="contextContent">
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
<!-- if includes -->
|
|
90
|
+
|
|
91
|
+
<div id="section">
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
<div id="constants-list">
|
|
95
|
+
<h3 class="section-bar">Constants</h3>
|
|
96
|
+
|
|
97
|
+
<div class="name-list">
|
|
98
|
+
<table summary="Constants">
|
|
99
|
+
<tr class="top-aligned-row context-row">
|
|
100
|
+
<td class="context-item-name">METHOD</td>
|
|
101
|
+
<td>=</td>
|
|
102
|
+
<td class="context-item-value">'COPY'</td>
|
|
103
|
+
</tr>
|
|
104
|
+
<tr class="top-aligned-row context-row">
|
|
105
|
+
<td class="context-item-name">REQUEST_HAS_BODY</td>
|
|
106
|
+
<td>=</td>
|
|
107
|
+
<td class="context-item-value">false</td>
|
|
108
|
+
</tr>
|
|
109
|
+
<tr class="top-aligned-row context-row">
|
|
110
|
+
<td class="context-item-name">RESPONSE_HAS_BODY</td>
|
|
111
|
+
<td>=</td>
|
|
112
|
+
<td class="context-item-value">true</td>
|
|
113
|
+
</tr>
|
|
114
|
+
</table>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
<!-- if method_list -->
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
<div id="validator-badges">
|
|
130
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
</body>
|
|
134
|
+
</html>
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>Class: Net::HTTP::Delete</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="classHeader">
|
|
50
|
+
<table class="header-table">
|
|
51
|
+
<tr class="top-aligned-row">
|
|
52
|
+
<td><strong>Class</strong></td>
|
|
53
|
+
<td class="class-name-in-header">Net::HTTP::Delete</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../../files/lib/mechanize/net-overrides/net/http_rb.html">
|
|
59
|
+
lib/mechanize/net-overrides/net/http.rb
|
|
60
|
+
</a>
|
|
61
|
+
<br />
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
|
|
65
|
+
<tr class="top-aligned-row">
|
|
66
|
+
<td><strong>Parent:</strong></td>
|
|
67
|
+
<td>
|
|
68
|
+
HTTPRequest
|
|
69
|
+
</td>
|
|
70
|
+
</tr>
|
|
71
|
+
</table>
|
|
72
|
+
</div>
|
|
73
|
+
<!-- banner header -->
|
|
74
|
+
|
|
75
|
+
<div id="bodyContent">
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<div id="contextContent">
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
<!-- if includes -->
|
|
90
|
+
|
|
91
|
+
<div id="section">
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
<div id="constants-list">
|
|
95
|
+
<h3 class="section-bar">Constants</h3>
|
|
96
|
+
|
|
97
|
+
<div class="name-list">
|
|
98
|
+
<table summary="Constants">
|
|
99
|
+
<tr class="top-aligned-row context-row">
|
|
100
|
+
<td class="context-item-name">METHOD</td>
|
|
101
|
+
<td>=</td>
|
|
102
|
+
<td class="context-item-value">'DELETE'</td>
|
|
103
|
+
</tr>
|
|
104
|
+
<tr class="top-aligned-row context-row">
|
|
105
|
+
<td class="context-item-name">REQUEST_HAS_BODY</td>
|
|
106
|
+
<td>=</td>
|
|
107
|
+
<td class="context-item-value">false</td>
|
|
108
|
+
</tr>
|
|
109
|
+
<tr class="top-aligned-row context-row">
|
|
110
|
+
<td class="context-item-name">RESPONSE_HAS_BODY</td>
|
|
111
|
+
<td>=</td>
|
|
112
|
+
<td class="context-item-value">true</td>
|
|
113
|
+
</tr>
|
|
114
|
+
</table>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
<!-- if method_list -->
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
<div id="validator-badges">
|
|
130
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
</body>
|
|
134
|
+
</html>
|