mechanize 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of mechanize might be problematic. Click here for more details.

Files changed (243) hide show
  1. data/EXAMPLES +55 -0
  2. data/README +3 -12
  3. data/lib/mechanize/cookie.rb +1 -2
  4. data/lib/mechanize/form.rb +182 -0
  5. data/lib/mechanize/form_elements.rb +105 -0
  6. data/lib/mechanize/page.rb +130 -0
  7. data/lib/mechanize/page_elements.rb +28 -0
  8. data/lib/mechanize.rb +27 -369
  9. data/test/htdocs/file_upload.html +13 -0
  10. data/test/htdocs/frame_test.html +23 -0
  11. data/test/server.rb +1 -0
  12. data/test/servlets.rb +6 -0
  13. data/test/tc_cookies.rb +2 -3
  14. data/test/tc_forms.rb +2 -3
  15. data/test/tc_frames.rb +22 -0
  16. data/test/tc_links.rb +2 -3
  17. data/test/tc_mech.rb +2 -3
  18. data/test/tc_response_code.rb +2 -3
  19. data/test/tc_upload.rb +34 -0
  20. data/test/test_includes.rb +5 -0
  21. data/test/ts_mech.rb +2 -0
  22. metadata +59 -307
  23. data/doc/classes/Net/HTTP/Copy.html +0 -134
  24. data/doc/classes/Net/HTTP/Delete.html +0 -134
  25. data/doc/classes/Net/HTTP/Get.html +0 -134
  26. data/doc/classes/Net/HTTP/Head.html +0 -134
  27. data/doc/classes/Net/HTTP/Lock.html +0 -134
  28. data/doc/classes/Net/HTTP/Mkcol.html +0 -134
  29. data/doc/classes/Net/HTTP/Move.html +0 -134
  30. data/doc/classes/Net/HTTP/Options.html +0 -134
  31. data/doc/classes/Net/HTTP/Post.html +0 -134
  32. data/doc/classes/Net/HTTP/Propfind.html +0 -134
  33. data/doc/classes/Net/HTTP/Proppatch.html +0 -134
  34. data/doc/classes/Net/HTTP/Put.html +0 -134
  35. data/doc/classes/Net/HTTP/Trace.html +0 -134
  36. data/doc/classes/Net/HTTP/Unlock.html +0 -134
  37. data/doc/classes/Net/HTTP.html +0 -1716
  38. data/doc/classes/Net/HTTP.src/M000103.html +0 -18
  39. data/doc/classes/Net/HTTP.src/M000104.html +0 -18
  40. data/doc/classes/Net/HTTP.src/M000105.html +0 -18
  41. data/doc/classes/Net/HTTP.src/M000106.html +0 -18
  42. data/doc/classes/Net/HTTP.src/M000107.html +0 -29
  43. data/doc/classes/Net/HTTP.src/M000108.html +0 -18
  44. data/doc/classes/Net/HTTP.src/M000109.html +0 -22
  45. data/doc/classes/Net/HTTP.src/M000110.html +0 -18
  46. data/doc/classes/Net/HTTP.src/M000111.html +0 -18
  47. data/doc/classes/Net/HTTP.src/M000112.html +0 -18
  48. data/doc/classes/Net/HTTP.src/M000113.html +0 -18
  49. data/doc/classes/Net/HTTP.src/M000114.html +0 -22
  50. data/doc/classes/Net/HTTP.src/M000115.html +0 -29
  51. data/doc/classes/Net/HTTP.src/M000116.html +0 -18
  52. data/doc/classes/Net/HTTP.src/M000117.html +0 -19
  53. data/doc/classes/Net/HTTP.src/M000118.html +0 -19
  54. data/doc/classes/Net/HTTP.src/M000119.html +0 -18
  55. data/doc/classes/Net/HTTP.src/M000121.html +0 -18
  56. data/doc/classes/Net/HTTP.src/M000122.html +0 -28
  57. data/doc/classes/Net/HTTP.src/M000123.html +0 -19
  58. data/doc/classes/Net/HTTP.src/M000124.html +0 -30
  59. data/doc/classes/Net/HTTP.src/M000125.html +0 -18
  60. data/doc/classes/Net/HTTP.src/M000126.html +0 -18
  61. data/doc/classes/Net/HTTP.src/M000127.html +0 -18
  62. data/doc/classes/Net/HTTP.src/M000128.html +0 -18
  63. data/doc/classes/Net/HTTP.src/M000129.html +0 -18
  64. data/doc/classes/Net/HTTP.src/M000130.html +0 -18
  65. data/doc/classes/Net/HTTP.src/M000133.html +0 -28
  66. data/doc/classes/Net/HTTP.src/M000134.html +0 -20
  67. data/doc/classes/Net/HTTP.src/M000135.html +0 -28
  68. data/doc/classes/Net/HTTP.src/M000136.html +0 -18
  69. data/doc/classes/Net/HTTP.src/M000137.html +0 -18
  70. data/doc/classes/Net/HTTP.src/M000138.html +0 -18
  71. data/doc/classes/Net/HTTP.src/M000139.html +0 -18
  72. data/doc/classes/Net/HTTP.src/M000140.html +0 -18
  73. data/doc/classes/Net/HTTP.src/M000141.html +0 -18
  74. data/doc/classes/Net/HTTP.src/M000142.html +0 -18
  75. data/doc/classes/Net/HTTP.src/M000143.html +0 -18
  76. data/doc/classes/Net/HTTP.src/M000144.html +0 -18
  77. data/doc/classes/Net/HTTP.src/M000145.html +0 -18
  78. data/doc/classes/Net/HTTP.src/M000146.html +0 -18
  79. data/doc/classes/Net/HTTP.src/M000147.html +0 -18
  80. data/doc/classes/Net/HTTP.src/M000148.html +0 -18
  81. data/doc/classes/Net/HTTP.src/M000152.html +0 -19
  82. data/doc/classes/Net/HTTP.src/M000153.html +0 -39
  83. data/doc/classes/Net/HTTP.src/M000154.html +0 -18
  84. data/doc/classes/Net/HTTP.src/M000156.html +0 -24
  85. data/doc/classes/Net/HTTP.src/M000157.html +0 -18
  86. data/doc/classes/Net/HTTP.src/M000158.html +0 -19
  87. data/doc/classes/Net/HTTP.src/M000159.html +0 -21
  88. data/doc/classes/Net/HTTP.src/M000161.html +0 -19
  89. data/doc/classes/Net/HTTPError.html +0 -120
  90. data/doc/classes/Net/HTTPExceptions.html +0 -137
  91. data/doc/classes/Net/HTTPFatalError.html +0 -120
  92. data/doc/classes/Net/HTTPGenericRequest.html +0 -274
  93. data/doc/classes/Net/HTTPGenericRequest.src/M000088.html +0 -26
  94. data/doc/classes/Net/HTTPGenericRequest.src/M000089.html +0 -18
  95. data/doc/classes/Net/HTTPGenericRequest.src/M000090.html +0 -18
  96. data/doc/classes/Net/HTTPGenericRequest.src/M000091.html +0 -18
  97. data/doc/classes/Net/HTTPGenericRequest.src/M000092.html +0 -19
  98. data/doc/classes/Net/HTTPGenericRequest.src/M000093.html +0 -20
  99. data/doc/classes/Net/HTTPGenericRequest.src/M000094.html +0 -20
  100. data/doc/classes/Net/HTTPHeader.html +0 -734
  101. data/doc/classes/Net/HTTPHeader.src/M000055.html +0 -23
  102. data/doc/classes/Net/HTTPHeader.src/M000056.html +0 -19
  103. data/doc/classes/Net/HTTPHeader.src/M000057.html +0 -22
  104. data/doc/classes/Net/HTTPHeader.src/M000058.html +0 -22
  105. data/doc/classes/Net/HTTPHeader.src/M000059.html +0 -19
  106. data/doc/classes/Net/HTTPHeader.src/M000060.html +0 -19
  107. data/doc/classes/Net/HTTPHeader.src/M000061.html +0 -20
  108. data/doc/classes/Net/HTTPHeader.src/M000063.html +0 -18
  109. data/doc/classes/Net/HTTPHeader.src/M000065.html +0 -20
  110. data/doc/classes/Net/HTTPHeader.src/M000066.html +0 -20
  111. data/doc/classes/Net/HTTPHeader.src/M000067.html +0 -18
  112. data/doc/classes/Net/HTTPHeader.src/M000068.html +0 -18
  113. data/doc/classes/Net/HTTPHeader.src/M000069.html +0 -18
  114. data/doc/classes/Net/HTTPHeader.src/M000070.html +0 -20
  115. data/doc/classes/Net/HTTPHeader.src/M000072.html +0 -30
  116. data/doc/classes/Net/HTTPHeader.src/M000073.html +0 -43
  117. data/doc/classes/Net/HTTPHeader.src/M000075.html +0 -21
  118. data/doc/classes/Net/HTTPHeader.src/M000076.html +0 -22
  119. data/doc/classes/Net/HTTPHeader.src/M000077.html +0 -20
  120. data/doc/classes/Net/HTTPHeader.src/M000078.html +0 -21
  121. data/doc/classes/Net/HTTPHeader.src/M000079.html +0 -19
  122. data/doc/classes/Net/HTTPHeader.src/M000080.html +0 -18
  123. data/doc/classes/Net/HTTPHeader.src/M000081.html +0 -19
  124. data/doc/classes/Net/HTTPHeader.src/M000082.html +0 -19
  125. data/doc/classes/Net/HTTPHeader.src/M000083.html +0 -23
  126. data/doc/classes/Net/HTTPHeader.src/M000084.html +0 -18
  127. data/doc/classes/Net/HTTPHeader.src/M000086.html +0 -18
  128. data/doc/classes/Net/HTTPHeader.src/M000087.html +0 -18
  129. data/doc/classes/Net/HTTPRequest.html +0 -150
  130. data/doc/classes/Net/HTTPRequest.src/M000102.html +0 -21
  131. data/doc/classes/Net/HTTPResponse.html +0 -425
  132. data/doc/classes/Net/HTTPResponse.src/M000162.html +0 -18
  133. data/doc/classes/Net/HTTPResponse.src/M000163.html +0 -18
  134. data/doc/classes/Net/HTTPResponse.src/M000164.html +0 -23
  135. data/doc/classes/Net/HTTPResponse.src/M000165.html +0 -18
  136. data/doc/classes/Net/HTTPResponse.src/M000166.html +0 -32
  137. data/doc/classes/Net/HTTPResponse.src/M000167.html +0 -18
  138. data/doc/classes/Net/HTTPRetriableError.html +0 -120
  139. data/doc/classes/Net/HTTPServerException.html +0 -120
  140. data/doc/classes/Net/ProtoAuthError.html +0 -113
  141. data/doc/classes/Net/ProtoCommandError.html +0 -113
  142. data/doc/classes/Net/ProtoFatalError.html +0 -113
  143. data/doc/classes/Net/ProtoRetriableError.html +0 -113
  144. data/doc/classes/Net/ProtoServerError.html +0 -113
  145. data/doc/classes/Net/ProtoSyntaxError.html +0 -113
  146. data/doc/classes/Net/ProtoUnknownError.html +0 -113
  147. data/doc/classes/Net/ProtocolError.html +0 -111
  148. data/doc/classes/Net/WriteAdapter.html +0 -235
  149. data/doc/classes/Net/WriteAdapter.src/M000095.html +0 -19
  150. data/doc/classes/Net/WriteAdapter.src/M000096.html +0 -18
  151. data/doc/classes/Net/WriteAdapter.src/M000097.html +0 -18
  152. data/doc/classes/Net/WriteAdapter.src/M000099.html +0 -19
  153. data/doc/classes/Net/WriteAdapter.src/M000100.html +0 -18
  154. data/doc/classes/Net/WriteAdapter.src/M000101.html +0 -18
  155. data/doc/classes/REXML/Comment.html +0 -137
  156. data/doc/classes/REXML/Comment.src/M000053.html +0 -18
  157. data/doc/classes/REXML/Node.html +0 -240
  158. data/doc/classes/REXML/Node.src/M000047.html +0 -21
  159. data/doc/classes/REXML/Node.src/M000048.html +0 -21
  160. data/doc/classes/REXML/Node.src/M000049.html +0 -22
  161. data/doc/classes/REXML/Node.src/M000050.html +0 -18
  162. data/doc/classes/REXML/Node.src/M000051.html +0 -18
  163. data/doc/classes/REXML/Node.src/M000052.html +0 -18
  164. data/doc/classes/REXML/Text.html +0 -137
  165. data/doc/classes/REXML/Text.src/M000054.html +0 -18
  166. data/doc/classes/REXML.html +0 -109
  167. data/doc/classes/WWW/Button.html +0 -190
  168. data/doc/classes/WWW/Button.src/M000028.html +0 -18
  169. data/doc/classes/WWW/Button.src/M000029.html +0 -18
  170. data/doc/classes/WWW/Button.src/M000030.html +0 -25
  171. data/doc/classes/WWW/CheckBox.html +0 -160
  172. data/doc/classes/WWW/CheckBox.src/M000024.html +0 -18
  173. data/doc/classes/WWW/Cookie.html +0 -207
  174. data/doc/classes/WWW/Cookie.src/M000032.html +0 -59
  175. data/doc/classes/WWW/Cookie.src/M000033.html +0 -21
  176. data/doc/classes/WWW/Cookie.src/M000034.html +0 -18
  177. data/doc/classes/WWW/CookieJar.html +0 -197
  178. data/doc/classes/WWW/CookieJar.src/M000008.html +0 -18
  179. data/doc/classes/WWW/CookieJar.src/M000009.html +0 -22
  180. data/doc/classes/WWW/CookieJar.src/M000010.html +0 -33
  181. data/doc/classes/WWW/CookieJar.src/M000011.html +0 -18
  182. data/doc/classes/WWW/Field.html +0 -174
  183. data/doc/classes/WWW/Field.src/M000045.html +0 -18
  184. data/doc/classes/WWW/Field.src/M000046.html +0 -26
  185. data/doc/classes/WWW/FileUpload.html +0 -163
  186. data/doc/classes/WWW/FileUpload.src/M000031.html +0 -19
  187. data/doc/classes/WWW/Form.html +0 -152
  188. data/doc/classes/WWW/Form.src/M000044.html +0 -19
  189. data/doc/classes/WWW/GlobalForm.html +0 -271
  190. data/doc/classes/WWW/GlobalForm.src/M000004.html +0 -24
  191. data/doc/classes/WWW/GlobalForm.src/M000005.html +0 -26
  192. data/doc/classes/WWW/GlobalForm.src/M000006.html +0 -46
  193. data/doc/classes/WWW/GlobalForm.src/M000007.html +0 -46
  194. data/doc/classes/WWW/ImageButton.html +0 -157
  195. data/doc/classes/WWW/ImageButton.src/M000027.html +0 -22
  196. data/doc/classes/WWW/Link.html +0 -160
  197. data/doc/classes/WWW/Link.src/M000025.html +0 -20
  198. data/doc/classes/WWW/Mechanize.html +0 -379
  199. data/doc/classes/WWW/Mechanize.src/M000013.html +0 -21
  200. data/doc/classes/WWW/Mechanize.src/M000014.html +0 -18
  201. data/doc/classes/WWW/Mechanize.src/M000015.html +0 -24
  202. data/doc/classes/WWW/Mechanize.src/M000016.html +0 -19
  203. data/doc/classes/WWW/Mechanize.src/M000017.html +0 -23
  204. data/doc/classes/WWW/Mechanize.src/M000018.html +0 -32
  205. data/doc/classes/WWW/Mechanize.src/M000019.html +0 -19
  206. data/doc/classes/WWW/Mechanize.src/M000020.html +0 -18
  207. data/doc/classes/WWW/Mechanize.src/M000021.html +0 -33
  208. data/doc/classes/WWW/Mechanize.src/M000022.html +0 -18
  209. data/doc/classes/WWW/Meta.html +0 -113
  210. data/doc/classes/WWW/Page.html +0 -313
  211. data/doc/classes/WWW/Page.src/M000036.html +0 -18
  212. data/doc/classes/WWW/Page.src/M000037.html +0 -18
  213. data/doc/classes/WWW/Page.src/M000038.html +0 -18
  214. data/doc/classes/WWW/Page.src/M000039.html +0 -19
  215. data/doc/classes/WWW/Page.src/M000040.html +0 -19
  216. data/doc/classes/WWW/Page.src/M000041.html +0 -19
  217. data/doc/classes/WWW/Page.src/M000042.html +0 -19
  218. data/doc/classes/WWW/Page.src/M000043.html +0 -19
  219. data/doc/classes/WWW/RadioButton.html +0 -160
  220. data/doc/classes/WWW/RadioButton.src/M000012.html +0 -18
  221. data/doc/classes/WWW/ResponseCodeError.html +0 -150
  222. data/doc/classes/WWW/ResponseCodeError.src/M000035.html +0 -18
  223. data/doc/classes/WWW/SelectList.html +0 -160
  224. data/doc/classes/WWW/SelectList.src/M000026.html +0 -28
  225. data/doc/classes/WWW.html +0 -130
  226. data/doc/created.rid +0 -1
  227. data/doc/files/CHANGELOG.html +0 -136
  228. data/doc/files/LICENSE.html +0 -531
  229. data/doc/files/README.html +0 -161
  230. data/doc/files/lib/mechanize/cookie_rb.html +0 -101
  231. data/doc/files/lib/mechanize/net-overrides/net/http_rb.html +0 -139
  232. data/doc/files/lib/mechanize/net-overrides/net/https_rb.html +0 -109
  233. data/doc/files/lib/mechanize/net-overrides/net/protocol_rb.html +0 -117
  234. data/doc/files/lib/mechanize/parsing_rb.html +0 -267
  235. data/doc/files/lib/mechanize/parsing_rb.src/M000001.html +0 -22
  236. data/doc/files/lib/mechanize/parsing_rb.src/M000002.html +0 -44
  237. data/doc/files/lib/mechanize/parsing_rb.src/M000003.html +0 -34
  238. data/doc/files/lib/mechanize_rb.html +0 -152
  239. data/doc/fr_class_index.html +0 -80
  240. data/doc/fr_file_index.html +0 -35
  241. data/doc/fr_method_index.html +0 -194
  242. data/doc/index.html +0 -24
  243. data/doc/rdoc-style.css +0 -208
@@ -1,734 +0,0 @@
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>Module: Net::HTTPHeader</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>Module</strong></td>
53
- <td class="class-name-in-header">Net::HTTPHeader</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
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
- <div id="description">
76
- <p>
77
- Header module.
78
- </p>
79
- <p>
80
- Provides access to @header in the mixed-into class as a hash-like object,
81
- except with case-insensitive keys. Also provides methods for accessing
82
- commonly-used header values in a more convenient format.
83
- </p>
84
-
85
- </div>
86
-
87
-
88
- </div>
89
-
90
- <div id="method-list">
91
- <h3 class="section-bar">Methods</h3>
92
-
93
- <div class="name-list">
94
- <a href="#M000056">[]</a>&nbsp;&nbsp;
95
- <a href="#M000057">[]=</a>&nbsp;&nbsp;
96
- <a href="#M000058">add_field</a>&nbsp;&nbsp;
97
- <a href="#M000086">basic_auth</a>&nbsp;&nbsp;
98
- <a href="#M000071">canonical_each</a>&nbsp;&nbsp;
99
- <a href="#M000077">chunked?</a>&nbsp;&nbsp;
100
- <a href="#M000075">content_length</a>&nbsp;&nbsp;
101
- <a href="#M000076">content_length=</a>&nbsp;&nbsp;
102
- <a href="#M000078">content_range</a>&nbsp;&nbsp;
103
- <a href="#M000080">content_type</a>&nbsp;&nbsp;
104
- <a href="#M000085">content_type=</a>&nbsp;&nbsp;
105
- <a href="#M000067">delete</a>&nbsp;&nbsp;
106
- <a href="#M000062">each</a>&nbsp;&nbsp;
107
- <a href="#M000070">each_capitalized</a>&nbsp;&nbsp;
108
- <a href="#M000065">each_capitalized_name</a>&nbsp;&nbsp;
109
- <a href="#M000061">each_header</a>&nbsp;&nbsp;
110
- <a href="#M000064">each_key</a>&nbsp;&nbsp;
111
- <a href="#M000063">each_name</a>&nbsp;&nbsp;
112
- <a href="#M000066">each_value</a>&nbsp;&nbsp;
113
- <a href="#M000060">fetch</a>&nbsp;&nbsp;
114
- <a href="#M000059">get_fields</a>&nbsp;&nbsp;
115
- <a href="#M000055">initialize_http_header</a>&nbsp;&nbsp;
116
- <a href="#M000068">key?</a>&nbsp;&nbsp;
117
- <a href="#M000081">main_type</a>&nbsp;&nbsp;
118
- <a href="#M000087">proxy_basic_auth</a>&nbsp;&nbsp;
119
- <a href="#M000072">range</a>&nbsp;&nbsp;
120
- <a href="#M000074">range=</a>&nbsp;&nbsp;
121
- <a href="#M000079">range_length</a>&nbsp;&nbsp;
122
- <a href="#M000084">set_content_type</a>&nbsp;&nbsp;
123
- <a href="#M000073">set_range</a>&nbsp;&nbsp;
124
- <a href="#M000082">sub_type</a>&nbsp;&nbsp;
125
- <a href="#M000069">to_hash</a>&nbsp;&nbsp;
126
- <a href="#M000083">type_params</a>&nbsp;&nbsp;
127
- </div>
128
- </div>
129
-
130
- </div>
131
-
132
-
133
- <!-- if includes -->
134
-
135
- <div id="section">
136
-
137
-
138
-
139
- <div id="aliases-list">
140
- <h3 class="section-bar">External Aliases</h3>
141
-
142
- <div class="name-list">
143
- <table summary="aliases">
144
- <tr class="top-aligned-row context-row">
145
- <td class="context-item-name">size</td>
146
- <td>-></td>
147
- <td class="context-item-value">length</td>
148
- </tr>
149
- </table>
150
- </div>
151
- </div>
152
-
153
-
154
-
155
-
156
-
157
- <!-- if method_list -->
158
- <div id="methods">
159
- <h3 class="section-bar">Public Instance methods</h3>
160
-
161
- <div id="method-M000056" class="method-detail">
162
- <a name="M000056"></a>
163
-
164
- <div class="method-heading">
165
- <a href="HTTPHeader.src/M000056.html" target="Code" class="method-signature"
166
- onclick="popupCode('HTTPHeader.src/M000056.html');return false;">
167
- <span class="method-name">[]</span><span class="method-args">(key)</span>
168
- </a>
169
- </div>
170
-
171
- <div class="method-description">
172
- <p>
173
- Returns the header field corresponding to the case-insensitive key. For
174
- example, a key of &quot;Content-Type&quot; might return
175
- &quot;text/html&quot;
176
- </p>
177
- </div>
178
- </div>
179
-
180
- <div id="method-M000057" class="method-detail">
181
- <a name="M000057"></a>
182
-
183
- <div class="method-heading">
184
- <a href="HTTPHeader.src/M000057.html" target="Code" class="method-signature"
185
- onclick="popupCode('HTTPHeader.src/M000057.html');return false;">
186
- <span class="method-name">[]=</span><span class="method-args">(key, val)</span>
187
- </a>
188
- </div>
189
-
190
- <div class="method-description">
191
- <p>
192
- Sets the header field corresponding to the case-insensitive key.
193
- </p>
194
- </div>
195
- </div>
196
-
197
- <div id="method-M000058" class="method-detail">
198
- <a name="M000058"></a>
199
-
200
- <div class="method-heading">
201
- <a href="HTTPHeader.src/M000058.html" target="Code" class="method-signature"
202
- onclick="popupCode('HTTPHeader.src/M000058.html');return false;">
203
- <span class="method-name">add_field</span><span class="method-args">(key, val)</span>
204
- </a>
205
- </div>
206
-
207
- <div class="method-description">
208
- <p>
209
- Adds header name and field instead of replace.
210
- </p>
211
- <pre>
212
- request.add_header 'X-My-Header', 'a'
213
- p request['X-My-Header'] #=&gt; &quot;a&quot;
214
- request.add_header 'X-My-Header', 'b'
215
- p request['X-My-Header'] #=&gt; &quot;a, b&quot;
216
- request.add_header 'X-My-Header', 'c'
217
- p request['X-My-Header'] #=&gt; &quot;a, b, c&quot;
218
- p request.get_fields('X-My-Header') #=&gt; [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]
219
- </pre>
220
- </div>
221
- </div>
222
-
223
- <div id="method-M000086" class="method-detail">
224
- <a name="M000086"></a>
225
-
226
- <div class="method-heading">
227
- <a href="HTTPHeader.src/M000086.html" target="Code" class="method-signature"
228
- onclick="popupCode('HTTPHeader.src/M000086.html');return false;">
229
- <span class="method-name">basic_auth</span><span class="method-args">(account, password)</span>
230
- </a>
231
- </div>
232
-
233
- <div class="method-description">
234
- <p>
235
- Set the Authorization: header for &quot;Basic&quot; authorization.
236
- </p>
237
- </div>
238
- </div>
239
-
240
- <div id="method-M000071" class="method-detail">
241
- <a name="M000071"></a>
242
-
243
- <div class="method-heading">
244
- <span class="method-name">canonical_each</span><span class="method-args">()</span>
245
- </div>
246
-
247
- <div class="method-description">
248
- <p>
249
- Alias for <a href="HTTPHeader.html#M000070">each_capitalized</a>
250
- </p>
251
- </div>
252
- </div>
253
-
254
- <div id="method-M000077" class="method-detail">
255
- <a name="M000077"></a>
256
-
257
- <div class="method-heading">
258
- <a href="HTTPHeader.src/M000077.html" target="Code" class="method-signature"
259
- onclick="popupCode('HTTPHeader.src/M000077.html');return false;">
260
- <span class="method-name">chunked?</span><span class="method-args">()</span>
261
- </a>
262
- </div>
263
-
264
- <div class="method-description">
265
- <p>
266
- Returns &quot;true&quot; if the &quot;transfer-encoding&quot; header is
267
- present and set to &quot;chunked&quot;. This is an <a
268
- href="HTTP.html">HTTP</a>/1.1 feature, allowing the the content to be sent
269
- in &quot;chunks&quot; without at the outset stating the entire content
270
- length.
271
- </p>
272
- </div>
273
- </div>
274
-
275
- <div id="method-M000075" class="method-detail">
276
- <a name="M000075"></a>
277
-
278
- <div class="method-heading">
279
- <a href="HTTPHeader.src/M000075.html" target="Code" class="method-signature"
280
- onclick="popupCode('HTTPHeader.src/M000075.html');return false;">
281
- <span class="method-name">content_length</span><span class="method-args">()</span>
282
- </a>
283
- </div>
284
-
285
- <div class="method-description">
286
- <p>
287
- Returns an Integer object which represents the Content-Length: header field
288
- or <tt>nil</tt> if that field is not provided.
289
- </p>
290
- </div>
291
- </div>
292
-
293
- <div id="method-M000076" class="method-detail">
294
- <a name="M000076"></a>
295
-
296
- <div class="method-heading">
297
- <a href="HTTPHeader.src/M000076.html" target="Code" class="method-signature"
298
- onclick="popupCode('HTTPHeader.src/M000076.html');return false;">
299
- <span class="method-name">content_length=</span><span class="method-args">(len)</span>
300
- </a>
301
- </div>
302
-
303
- <div class="method-description">
304
- </div>
305
- </div>
306
-
307
- <div id="method-M000078" class="method-detail">
308
- <a name="M000078"></a>
309
-
310
- <div class="method-heading">
311
- <a href="HTTPHeader.src/M000078.html" target="Code" class="method-signature"
312
- onclick="popupCode('HTTPHeader.src/M000078.html');return false;">
313
- <span class="method-name">content_range</span><span class="method-args">()</span>
314
- </a>
315
- </div>
316
-
317
- <div class="method-description">
318
- <p>
319
- Returns a Range object which represents Content-Range: header field. This
320
- indicates, for a partial entity body, where this fragment fits inside the
321
- full entity body, as range of byte offsets.
322
- </p>
323
- </div>
324
- </div>
325
-
326
- <div id="method-M000080" class="method-detail">
327
- <a name="M000080"></a>
328
-
329
- <div class="method-heading">
330
- <a href="HTTPHeader.src/M000080.html" target="Code" class="method-signature"
331
- onclick="popupCode('HTTPHeader.src/M000080.html');return false;">
332
- <span class="method-name">content_type</span><span class="method-args">()</span>
333
- </a>
334
- </div>
335
-
336
- <div class="method-description">
337
- </div>
338
- </div>
339
-
340
- <div id="method-M000085" class="method-detail">
341
- <a name="M000085"></a>
342
-
343
- <div class="method-heading">
344
- <span class="method-name">content_type=</span><span class="method-args">(type, params = {})</span>
345
- </div>
346
-
347
- <div class="method-description">
348
- <p>
349
- Alias for <a href="HTTPHeader.html#M000084">set_content_type</a>
350
- </p>
351
- </div>
352
- </div>
353
-
354
- <div id="method-M000067" class="method-detail">
355
- <a name="M000067"></a>
356
-
357
- <div class="method-heading">
358
- <a href="HTTPHeader.src/M000067.html" target="Code" class="method-signature"
359
- onclick="popupCode('HTTPHeader.src/M000067.html');return false;">
360
- <span class="method-name">delete</span><span class="method-args">(key)</span>
361
- </a>
362
- </div>
363
-
364
- <div class="method-description">
365
- <p>
366
- Removes a header field.
367
- </p>
368
- </div>
369
- </div>
370
-
371
- <div id="method-M000062" class="method-detail">
372
- <a name="M000062"></a>
373
-
374
- <div class="method-heading">
375
- <span class="method-name">each</span><span class="method-args">(</span>
376
- </div>
377
-
378
- <div class="method-description">
379
- <p>
380
- Alias for <a href="HTTPHeader.html#M000061">each_header</a>
381
- </p>
382
- </div>
383
- </div>
384
-
385
- <div id="method-M000070" class="method-detail">
386
- <a name="M000070"></a>
387
-
388
- <div class="method-heading">
389
- <a href="HTTPHeader.src/M000070.html" target="Code" class="method-signature"
390
- onclick="popupCode('HTTPHeader.src/M000070.html');return false;">
391
- <span class="method-name">each_capitalized</span><span class="method-args">() {|capitalize(k), v.join(', ')| ...}</span>
392
- </a>
393
- </div>
394
-
395
- <div class="method-description">
396
- <p>
397
- As for <a href="HTTPHeader.html#M000061">each_header</a>, except the keys
398
- are provided in capitalized form.
399
- </p>
400
- </div>
401
- </div>
402
-
403
- <div id="method-M000065" class="method-detail">
404
- <a name="M000065"></a>
405
-
406
- <div class="method-heading">
407
- <a href="HTTPHeader.src/M000065.html" target="Code" class="method-signature"
408
- onclick="popupCode('HTTPHeader.src/M000065.html');return false;">
409
- <span class="method-name">each_capitalized_name</span><span class="method-args">() {|+key+| ...}</span>
410
- </a>
411
- </div>
412
-
413
- <div class="method-description">
414
- <p>
415
- Iterates for each capitalized header names.
416
- </p>
417
- </div>
418
- </div>
419
-
420
- <div id="method-M000061" class="method-detail">
421
- <a name="M000061"></a>
422
-
423
- <div class="method-heading">
424
- <a href="HTTPHeader.src/M000061.html" target="Code" class="method-signature"
425
- onclick="popupCode('HTTPHeader.src/M000061.html');return false;">
426
- <span class="method-name">each_header</span><span class="method-args">( {|+key+, +value+| ...}</span>
427
- </a>
428
- </div>
429
-
430
- <div class="method-description">
431
- <p>
432
- Iterates for each header names and values.
433
- </p>
434
- </div>
435
- </div>
436
-
437
- <div id="method-M000064" class="method-detail">
438
- <a name="M000064"></a>
439
-
440
- <div class="method-heading">
441
- <span class="method-name">each_key</span><span class="method-args">()</span>
442
- </div>
443
-
444
- <div class="method-description">
445
- <p>
446
- Alias for <a href="HTTPHeader.html#M000063">each_name</a>
447
- </p>
448
- </div>
449
- </div>
450
-
451
- <div id="method-M000063" class="method-detail">
452
- <a name="M000063"></a>
453
-
454
- <div class="method-heading">
455
- <a href="HTTPHeader.src/M000063.html" target="Code" class="method-signature"
456
- onclick="popupCode('HTTPHeader.src/M000063.html');return false;">
457
- <span class="method-name">each_name</span><span class="method-args">() {|+key+| ...}</span>
458
- </a>
459
- </div>
460
-
461
- <div class="method-description">
462
- <p>
463
- Iterates for each header names.
464
- </p>
465
- </div>
466
- </div>
467
-
468
- <div id="method-M000066" class="method-detail">
469
- <a name="M000066"></a>
470
-
471
- <div class="method-heading">
472
- <a href="HTTPHeader.src/M000066.html" target="Code" class="method-signature"
473
- onclick="popupCode('HTTPHeader.src/M000066.html');return false;">
474
- <span class="method-name">each_value</span><span class="method-args">( {|+value+| ...}</span>
475
- </a>
476
- </div>
477
-
478
- <div class="method-description">
479
- <p>
480
- Iterates for each header values.
481
- </p>
482
- </div>
483
- </div>
484
-
485
- <div id="method-M000060" class="method-detail">
486
- <a name="M000060"></a>
487
-
488
- <div class="method-heading">
489
- <a href="HTTPHeader.src/M000060.html" target="Code" class="method-signature"
490
- onclick="popupCode('HTTPHeader.src/M000060.html');return false;">
491
- <span class="method-name">fetch</span><span class="method-args">(key, *args) {|+key+| ...}</span>
492
- </a>
493
- </div>
494
-
495
- <div class="method-description">
496
- <p>
497
- Returns the header field corresponding to the case-insensitive key. Returns
498
- the default value <tt>args</tt>, or the result of the block, or nil, if
499
- there&#8217;s no header field named key. See Hash#fetch
500
- </p>
501
- </div>
502
- </div>
503
-
504
- <div id="method-M000059" class="method-detail">
505
- <a name="M000059"></a>
506
-
507
- <div class="method-heading">
508
- <a href="HTTPHeader.src/M000059.html" target="Code" class="method-signature"
509
- onclick="popupCode('HTTPHeader.src/M000059.html');return false;">
510
- <span class="method-name">get_fields</span><span class="method-args">(key)</span>
511
- </a>
512
- </div>
513
-
514
- <div class="method-description">
515
- <p>
516
- Returns the header field by Array, corresponding to the case-insensitive
517
- key. This method allows you to get duplicated fields without any
518
- processing.
519
- </p>
520
- <pre>
521
- p response.get_fields('Set-Cookie')
522
- #=&gt; [&quot;session=al98axx; expires=Fri, 31-Dec-1999 23:58:23&quot;,
523
- &quot;query=rubyscript; expires=Fri, 31-Dec-1999 23:58:23&quot;]
524
- p response['Set-Cookie']
525
- #=&gt; &quot;session=al98axx; expires=Fri, 31-Dec-1999 23:58:23, query=rubyscript; expires=Fri, 31-Dec-1999 23:58:23&quot;
526
- </pre>
527
- </div>
528
- </div>
529
-
530
- <div id="method-M000055" class="method-detail">
531
- <a name="M000055"></a>
532
-
533
- <div class="method-heading">
534
- <a href="HTTPHeader.src/M000055.html" target="Code" class="method-signature"
535
- onclick="popupCode('HTTPHeader.src/M000055.html');return false;">
536
- <span class="method-name">initialize_http_header</span><span class="method-args">(initheader)</span>
537
- </a>
538
- </div>
539
-
540
- <div class="method-description">
541
- </div>
542
- </div>
543
-
544
- <div id="method-M000068" class="method-detail">
545
- <a name="M000068"></a>
546
-
547
- <div class="method-heading">
548
- <a href="HTTPHeader.src/M000068.html" target="Code" class="method-signature"
549
- onclick="popupCode('HTTPHeader.src/M000068.html');return false;">
550
- <span class="method-name">key?</span><span class="method-args">(key)</span>
551
- </a>
552
- </div>
553
-
554
- <div class="method-description">
555
- <p>
556
- true if <tt>key</tt> header exists.
557
- </p>
558
- </div>
559
- </div>
560
-
561
- <div id="method-M000081" class="method-detail">
562
- <a name="M000081"></a>
563
-
564
- <div class="method-heading">
565
- <a href="HTTPHeader.src/M000081.html" target="Code" class="method-signature"
566
- onclick="popupCode('HTTPHeader.src/M000081.html');return false;">
567
- <span class="method-name">main_type</span><span class="method-args">()</span>
568
- </a>
569
- </div>
570
-
571
- <div class="method-description">
572
- </div>
573
- </div>
574
-
575
- <div id="method-M000087" class="method-detail">
576
- <a name="M000087"></a>
577
-
578
- <div class="method-heading">
579
- <a href="HTTPHeader.src/M000087.html" target="Code" class="method-signature"
580
- onclick="popupCode('HTTPHeader.src/M000087.html');return false;">
581
- <span class="method-name">proxy_basic_auth</span><span class="method-args">(account, password)</span>
582
- </a>
583
- </div>
584
-
585
- <div class="method-description">
586
- <p>
587
- Set Proxy-Authorization: header for &quot;Basic&quot; authorization.
588
- </p>
589
- </div>
590
- </div>
591
-
592
- <div id="method-M000072" class="method-detail">
593
- <a name="M000072"></a>
594
-
595
- <div class="method-heading">
596
- <a href="HTTPHeader.src/M000072.html" target="Code" class="method-signature"
597
- onclick="popupCode('HTTPHeader.src/M000072.html');return false;">
598
- <span class="method-name">range</span><span class="method-args">()</span>
599
- </a>
600
- </div>
601
-
602
- <div class="method-description">
603
- <p>
604
- Returns an Array of Range objects which represents Range: header field, or
605
- <tt>nil</tt> if there is no such header.
606
- </p>
607
- </div>
608
- </div>
609
-
610
- <div id="method-M000074" class="method-detail">
611
- <a name="M000074"></a>
612
-
613
- <div class="method-heading">
614
- <span class="method-name">range=</span><span class="method-args">(r, e = nil)</span>
615
- </div>
616
-
617
- <div class="method-description">
618
- <p>
619
- Alias for <a href="HTTPHeader.html#M000073">set_range</a>
620
- </p>
621
- </div>
622
- </div>
623
-
624
- <div id="method-M000079" class="method-detail">
625
- <a name="M000079"></a>
626
-
627
- <div class="method-heading">
628
- <a href="HTTPHeader.src/M000079.html" target="Code" class="method-signature"
629
- onclick="popupCode('HTTPHeader.src/M000079.html');return false;">
630
- <span class="method-name">range_length</span><span class="method-args">()</span>
631
- </a>
632
- </div>
633
-
634
- <div class="method-description">
635
- <p>
636
- The length of the range represented in Content-Range: header.
637
- </p>
638
- </div>
639
- </div>
640
-
641
- <div id="method-M000084" class="method-detail">
642
- <a name="M000084"></a>
643
-
644
- <div class="method-heading">
645
- <a href="HTTPHeader.src/M000084.html" target="Code" class="method-signature"
646
- onclick="popupCode('HTTPHeader.src/M000084.html');return false;">
647
- <span class="method-name">set_content_type</span><span class="method-args">(type, params = {})</span>
648
- </a>
649
- </div>
650
-
651
- <div class="method-description">
652
- </div>
653
- </div>
654
-
655
- <div id="method-M000073" class="method-detail">
656
- <a name="M000073"></a>
657
-
658
- <div class="method-heading">
659
- <a href="HTTPHeader.src/M000073.html" target="Code" class="method-signature"
660
- onclick="popupCode('HTTPHeader.src/M000073.html');return false;">
661
- <span class="method-name">set_range</span><span class="method-args">(r, e = nil)</span>
662
- </a>
663
- </div>
664
-
665
- <div class="method-description">
666
- <p>
667
- Set Range: header from Range (arg r) or beginning index and length from it
668
- (arg idx&amp;len).
669
- </p>
670
- <pre>
671
- req.range = (0..1023)
672
- req.set_range 0, 1023
673
- </pre>
674
- </div>
675
- </div>
676
-
677
- <div id="method-M000082" class="method-detail">
678
- <a name="M000082"></a>
679
-
680
- <div class="method-heading">
681
- <a href="HTTPHeader.src/M000082.html" target="Code" class="method-signature"
682
- onclick="popupCode('HTTPHeader.src/M000082.html');return false;">
683
- <span class="method-name">sub_type</span><span class="method-args">()</span>
684
- </a>
685
- </div>
686
-
687
- <div class="method-description">
688
- </div>
689
- </div>
690
-
691
- <div id="method-M000069" class="method-detail">
692
- <a name="M000069"></a>
693
-
694
- <div class="method-heading">
695
- <a href="HTTPHeader.src/M000069.html" target="Code" class="method-signature"
696
- onclick="popupCode('HTTPHeader.src/M000069.html');return false;">
697
- <span class="method-name">to_hash</span><span class="method-args">()</span>
698
- </a>
699
- </div>
700
-
701
- <div class="method-description">
702
- <p>
703
- Returns a Hash consist of header names and values.
704
- </p>
705
- </div>
706
- </div>
707
-
708
- <div id="method-M000083" class="method-detail">
709
- <a name="M000083"></a>
710
-
711
- <div class="method-heading">
712
- <a href="HTTPHeader.src/M000083.html" target="Code" class="method-signature"
713
- onclick="popupCode('HTTPHeader.src/M000083.html');return false;">
714
- <span class="method-name">type_params</span><span class="method-args">()</span>
715
- </a>
716
- </div>
717
-
718
- <div class="method-description">
719
- </div>
720
- </div>
721
-
722
-
723
- </div>
724
-
725
-
726
- </div>
727
-
728
-
729
- <div id="validator-badges">
730
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
731
- </div>
732
-
733
- </body>
734
- </html>