doc/rdoc/classes/RFuzz/HttpClient.html in rfuzz-0.7 vs doc/rdoc/classes/RFuzz/HttpClient.html in rfuzz-0.8
- old
+ new
@@ -103,15 +103,15 @@
resp = client.post("/test", :head => {"X-TestSend" => "Status"}, :body => "TEST BODY")
resp = client.put("/testput", :query => {"q" => "test"}, :body => "SOME JUNK")
client.reset
</pre>
<p>
-The <a href="HttpClient.html#M000018">HttpClient.reset</a> call clears
+The <a href="HttpClient.html#M000029">HttpClient.reset</a> call clears
cookies that are maintained.
</p>
<p>
-It uses <a href="HttpClient.html#M000016">method_missing</a> to do the
+It uses <a href="HttpClient.html#M000027">method_missing</a> to do the
translation of .put to "PUT /testput HTTP/1.1" so you can get
into trouble if you’re calling unknown methods on it. By default the
methods are PUT, GET, POST, DELETE, HEAD. You can change the allowed
methods by passing :allowed_methods => [:put, :get, ..] to the
initialize for the object.
@@ -143,20 +143,22 @@
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
- <a href="#M000011">build_request</a>
- <a href="#M000016">method_missing</a>
- <a href="#M000010">new</a>
- <a href="#M000019">notify</a>
- <a href="#M000013">read_chunked_encoding</a>
- <a href="#M000012">read_chunks</a>
- <a href="#M000014">read_response</a>
- <a href="#M000017">redirect</a>
- <a href="#M000018">reset</a>
- <a href="#M000015">send_request</a>
+ <a href="#M000020">build_request</a>
+ <a href="#M000027">method_missing</a>
+ <a href="#M000019">new</a>
+ <a href="#M000030">notify</a>
+ <a href="#M000023">read_chunked_body</a>
+ <a href="#M000022">read_chunked_header</a>
+ <a href="#M000021">read_parsed_header</a>
+ <a href="#M000025">read_response</a>
+ <a href="#M000028">redirect</a>
+ <a href="#M000029">reset</a>
+ <a href="#M000026">send_request</a>
+ <a href="#M000024">store_cookies</a>
</div>
</div>
</div>
@@ -216,10 +218,20 @@
<tr class="top-aligned-row context-row">
<td class="context-item-name">REQ_HOST</td>
<td>=</td>
<td class="context-item-value">"Host"</td>
</tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">CHUNK_SIZE</td>
+ <td>=</td>
+ <td class="context-item-value">1024 * 16</td>
+ </tr>
+ <tr class="top-aligned-row context-row">
+ <td class="context-item-name">CRLF</td>
+ <td>=</td>
+ <td class="context-item-value">"\r\n"</td>
+ </tr>
</table>
</div>
</div>
@@ -285,16 +297,16 @@
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
- <div id="method-M000010" class="method-detail">
- <a name="M000010"></a>
+ <div id="method-M000019" class="method-detail">
+ <a name="M000019"></a>
<div class="method-heading">
- <a href="HttpClient.src/M000010.html" target="Code" class="method-signature"
- onclick="popupCode('HttpClient.src/M000010.html');return false;">
+ <a href="HttpClient.src/M000019.html" target="Code" class="method-signature"
+ onclick="popupCode('HttpClient.src/M000019.html');return false;">
<span class="method-name">new</span><span class="method-args">(host, port, options = {})</span>
</a>
</div>
<div class="method-description">
@@ -304,16 +316,16 @@
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
- <div id="method-M000011" class="method-detail">
- <a name="M000011"></a>
+ <div id="method-M000020" class="method-detail">
+ <a name="M000020"></a>
<div class="method-heading">
- <a href="HttpClient.src/M000011.html" target="Code" class="method-signature"
- onclick="popupCode('HttpClient.src/M000011.html');return false;">
+ <a href="HttpClient.src/M000020.html" target="Code" class="method-signature"
+ onclick="popupCode('HttpClient.src/M000020.html');return false;">
<span class="method-name">build_request</span><span class="method-args">(out, method, uri, req)</span>
</a>
</div>
<div class="method-description">
@@ -326,16 +338,16 @@
resolution).
</p>
</div>
</div>
- <div id="method-M000016" class="method-detail">
- <a name="M000016"></a>
+ <div id="method-M000027" class="method-detail">
+ <a name="M000027"></a>
<div class="method-heading">
- <a href="HttpClient.src/M000016.html" target="Code" class="method-signature"
- onclick="popupCode('HttpClient.src/M000016.html');return false;">
+ <a href="HttpClient.src/M000027.html" target="Code" class="method-signature"
+ onclick="popupCode('HttpClient.src/M000027.html');return false;">
<span class="method-name">method_missing</span><span class="method-args">(symbol, *args)</span>
</a>
</div>
<div class="method-description">
@@ -346,16 +358,16 @@
construction with :allowed_methods => [:put, :get, …]
</p>
</div>
</div>
- <div id="method-M000019" class="method-detail">
- <a name="M000019"></a>
+ <div id="method-M000030" class="method-detail">
+ <a name="M000030"></a>
<div class="method-heading">
- <a href="HttpClient.src/M000019.html" target="Code" class="method-signature"
- onclick="popupCode('HttpClient.src/M000019.html');return false;">
+ <a href="HttpClient.src/M000030.html" target="Code" class="method-signature"
+ onclick="popupCode('HttpClient.src/M000030.html');return false;">
<span class="method-name">notify</span><span class="method-args">(event) {|| ...}</span>
</a>
</div>
<div class="method-description">
@@ -368,50 +380,77 @@
attempt fails.
</p>
</div>
</div>
- <div id="method-M000013" class="method-detail">
- <a name="M000013"></a>
+ <div id="method-M000023" class="method-detail">
+ <a name="M000023"></a>
<div class="method-heading">
- <a href="HttpClient.src/M000013.html" target="Code" class="method-signature"
- onclick="popupCode('HttpClient.src/M000013.html');return false;">
- <span class="method-name">read_chunked_encoding</span><span class="method-args">(resp, sock, parser)</span>
+ <a href="HttpClient.src/M000023.html" target="Code" class="method-signature"
+ onclick="popupCode('HttpClient.src/M000023.html');return false;">
+ <span class="method-name">read_chunked_body</span><span class="method-args">(header)</span>
</a>
</div>
<div class="method-description">
+ <p>
+Collects up a chunked body both collecting the body together <b>and</b>
+collecting the chunks into HttpResponse.raw_chunks[] for alternative
+analysis.
+</p>
</div>
</div>
- <div id="method-M000012" class="method-detail">
- <a name="M000012"></a>
+ <div id="method-M000022" class="method-detail">
+ <a name="M000022"></a>
<div class="method-heading">
- <a href="HttpClient.src/M000012.html" target="Code" class="method-signature"
- onclick="popupCode('HttpClient.src/M000012.html');return false;">
- <span class="method-name">read_chunks</span><span class="method-args">(input, out, parser)</span>
+ <a href="HttpClient.src/M000022.html" target="Code" class="method-signature"
+ onclick="popupCode('HttpClient.src/M000022.html');return false;">
+ <span class="method-name">read_chunked_header</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
+ <p>
+Used to process chunked headers and then read up their bodies.
+</p>
</div>
</div>
- <div id="method-M000014" class="method-detail">
- <a name="M000014"></a>
+ <div id="method-M000021" class="method-detail">
+ <a name="M000021"></a>
<div class="method-heading">
- <a href="HttpClient.src/M000014.html" target="Code" class="method-signature"
- onclick="popupCode('HttpClient.src/M000014.html');return false;">
- <span class="method-name">read_response</span><span class="method-args">(sock)</span>
+ <a href="HttpClient.src/M000021.html" target="Code" class="method-signature"
+ onclick="popupCode('HttpClient.src/M000021.html');return false;">
+ <span class="method-name">read_parsed_header</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
+Does the read operations needed to parse a header with the @parser. A
+"header" in this case is either an HTTP header or a Chunked
+encoding header (since the @parser handles both).
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000025" class="method-detail">
+ <a name="M000025"></a>
+
+ <div class="method-heading">
+ <a href="HttpClient.src/M000025.html" target="Code" class="method-signature"
+ onclick="popupCode('HttpClient.src/M000025.html');return false;">
+ <span class="method-name">read_response</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
Reads an HTTP response from the given socket. It uses readpartial which
only appeared in Ruby 1.8.4. The result is a fully formed <a
href="HttpResponse.html">HttpResponse</a> object for you to play with.
</p>
<p>
@@ -420,16 +459,16 @@
so either write a wrapper, use net/http, or deal with it on your end.
</p>
</div>
</div>
- <div id="method-M000017" class="method-detail">
- <a name="M000017"></a>
+ <div id="method-M000028" class="method-detail">
+ <a name="M000028"></a>
<div class="method-heading">
- <a href="HttpClient.src/M000017.html" target="Code" class="method-signature"
- onclick="popupCode('HttpClient.src/M000017.html');return false;">
+ <a href="HttpClient.src/M000028.html" target="Code" class="method-signature"
+ onclick="popupCode('HttpClient.src/M000028.html');return false;">
<span class="method-name">redirect</span><span class="method-args">(method, resp, *args)</span>
</a>
</div>
<div class="method-description">
@@ -437,16 +476,16 @@
Keeps doing requests until it doesn’t receive a 3XX request.
</p>
</div>
</div>
- <div id="method-M000018" class="method-detail">
- <a name="M000018"></a>
+ <div id="method-M000029" class="method-detail">
+ <a name="M000029"></a>
<div class="method-heading">
- <a href="HttpClient.src/M000018.html" target="Code" class="method-signature"
- onclick="popupCode('HttpClient.src/M000018.html');return false;">
+ <a href="HttpClient.src/M000029.html" target="Code" class="method-signature"
+ onclick="popupCode('HttpClient.src/M000029.html');return false;">
<span class="method-name">reset</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
@@ -454,25 +493,43 @@
Clears out the cookies in use so far in order to get a clean slate.
</p>
</div>
</div>
- <div id="method-M000015" class="method-detail">
- <a name="M000015"></a>
+ <div id="method-M000026" class="method-detail">
+ <a name="M000026"></a>
<div class="method-heading">
- <a href="HttpClient.src/M000015.html" target="Code" class="method-signature"
- onclick="popupCode('HttpClient.src/M000015.html');return false;">
+ <a href="HttpClient.src/M000026.html" target="Code" class="method-signature"
+ onclick="popupCode('HttpClient.src/M000026.html');return false;">
<span class="method-name">send_request</span><span class="method-args">(method, uri, req)</span>
</a>
</div>
<div class="method-description">
<p>
Does the socket connect and then <a
-href="HttpClient.html#M000011">build_request</a>, <a
-href="HttpClient.html#M000014">read_response</a> calls finally returning
+href="HttpClient.html#M000020">build_request</a>, <a
+href="HttpClient.html#M000025">read_response</a> calls finally returning
the result.
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000024" class="method-detail">
+ <a name="M000024"></a>
+
+ <div class="method-heading">
+ <a href="HttpClient.src/M000024.html" target="Code" class="method-signature"
+ onclick="popupCode('HttpClient.src/M000024.html');return false;">
+ <span class="method-name">store_cookies</span><span class="method-args">(resp)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Reads the SET_COOKIE string out of resp and translates it into the @cookies
+store for this <a href="HttpClient.html">HttpClient</a>.
</p>
</div>
</div>
\ No newline at end of file