<commit_before>h1. What's this?

Rack::Client is an HTTP client that aims to be a good Rack
citizen.

h1. Install

To install the latest release as a gem:
<pre>sudo gem install rack-client</pre>
Then in Ruby:
<pre>require "rubygems"; require "rack/client" # and you're off!</pre>

h2. Rack responses

Rack::Client can be used to make HTTP requests to any type of server, not
just ones using Rack. However, when a request is made then a proper
Rack response (specifically a Rack::MockResponse) object is returned.
For Rubyists, this means you don't need to learn yet another interface
and can just stick with Rack both on the server, test, and client side of
things.

<pre>
response = Rack::Client.get("http://some-website.com/blah.txt")
response.code #=> 200
response.body #=> "some body"
</pre>

h2. Middleware

Rack::Client is actually a subclass of Rack::Builder. This means that
Rack::Client objects yield actual Rack apps. More importantly, this
means you can reuse existing Rack middleware on the client side too
(but also feel free to make new middleware that only makes sense on
the client side under the Rack::Client namespace). Note that by default
Rack::Client will "run" Rack::Client::HTTP as an endpoint, but this
will not be performed if you specify your own "run" endpoint.

<pre>
client = Rack::Client.new { use Rack::ETag }
response = client.get("http://localhost:9292/no-etag")
</pre>

h2. Rack::Test compatibility

Rack::Client reuses a lot of Rack::Test to provide users with a
familiar interface. What's even cooler is that you can use a
Rack::Client object as your "app" in Rack::Test. This means that you
can test-drive an application with Rack::Test, then when ready
actually run your Rack app, switch your Rack::Test "app" to a
Rack::Client, and get free full-blown integration testing! Note that
the integration-tested server does not need to be all-Rack, so you can
develop quickly with middleware like Rack::Cache but then remove it
and integration test with a dedicated cache server like Varnish.
<commit_msg>fix readme - .status for status code<commit_after>h1. What's this?

Rack::Client is an HTTP client that aims to be a good Rack
citizen.

h1. Install

To install the latest release as a gem:
<pre>sudo gem install rack-client</pre>
Then in Ruby:
<pre>require "rubygems"; require "rack/client" # and you're off!</pre>

h2. Rack responses

Rack::Client can be used to make HTTP requests to any type of server, not
just ones using Rack. However, when a request is made then a proper
Rack response (specifically a Rack::MockResponse) object is returned.
For Rubyists, this means you don't need to learn yet another interface
and can just stick with Rack both on the server, test, and client side of
things.

<pre>
response = Rack::Client.get("http://some-website.com/blah.txt")
response.status #=> 200
response.body #=> "some body"
</pre>

h2. Middleware

Rack::Client is actually a subclass of Rack::Builder. This means that
Rack::Client objects yield actual Rack apps. More importantly, this
means you can reuse existing Rack middleware on the client side too
(but also feel free to make new middleware that only makes sense on
the client side under the Rack::Client namespace). Note that by default
Rack::Client will "run" Rack::Client::HTTP as an endpoint, but this
will not be performed if you specify your own "run" endpoint.

<pre>
client = Rack::Client.new { use Rack::ETag }
response = client.get("http://localhost:9292/no-etag")
</pre>

h2. Rack::Test compatibility

Rack::Client reuses a lot of Rack::Test to provide users with a
familiar interface. What's even cooler is that you can use a
Rack::Client object as your "app" in Rack::Test. This means that you
can test-drive an application with Rack::Test, then when ready
actually run your Rack app, switch your Rack::Test "app" to a
Rack::Client, and get free full-blown integration testing! Note that
the integration-tested server does not need to be all-Rack, so you can
develop quickly with middleware like Rack::Cache but then remove it
and integration test with a dedicated cache server like Varnish.

{'fraction_non_alphanumeric': 0.0814435503535723, 'fraction_numerical': 0.005852231163130944, 'mean_word_length': 4.673582295988935, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5724847', 'n_tokens_mistral': 1217, 'n_tokens_neox': 1174, 'n_words': 599}