<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -43,6 +43,8 @@ module Halcyon
     
     USER_AGENT = &quot;JSON/#{JSON::VERSION} Compatible (en-US) Halcyon::Client/#{Halcyon.version}&quot;.freeze
     CONTENT_TYPE = &quot;application/x-www-form-urlencoded&quot;.freeze
+    ACCEPT = &quot;application/json, */*&quot;.freeze
+    
     DEFAULT_OPTIONS = {
       :raise_exceptions =&gt; false,
       :encode_post_body_as_json =&gt; false
@@ -183,6 +185,7 @@ module Halcyon
     def request(req, headers={})
       # set default headers
       req[&quot;User-Agent&quot;] = USER_AGENT
+      req[&quot;Accept&quot;] = ACCEPT
       req[&quot;Content-Type&quot;] = CONTENT_TYPE unless req.body.nil?
       req[&quot;Content-Length&quot;] = req.body unless req.body.nil?
       </diff>
      <filename>lib/halcyon/client.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,6 +31,21 @@ end
 # Tests
 #++
 
+module Halcyon
+  class Client
+    private
+    def prepare_server(serv)
+      class &lt;&lt; serv
+        alias :request_without_header_inspection :request
+        def request(req, body = nil, &amp;block)
+          $accept = req[&quot;Accept&quot;]
+          request_without_header_inspection(req, body, &amp;block)
+        end
+      end
+    end
+  end
+end
+
 describe &quot;Halcyon::Client&quot; do
   
   before do
@@ -101,4 +116,9 @@ describe &quot;Halcyon::Client&quot; do
     @client.post('/returner', body)[:body][:key].should == &quot;value&quot;
   end
   
+  it &quot;should set the Accept header to the appropriate type&quot; do
+    @client.get('/returner')[:status].should == 200
+    $accept.should == Halcyon::Client::ACCEPT
+  end
+  
 end</diff>
      <filename>spec/halcyon/client_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6ab98d687d760e932b2063a2579292066c0b64c5</id>
    </parent>
  </parents>
  <author>
    <name>Matt Todd</name>
    <email>chiology@gmail.com</email>
  </author>
  <url>http://github.com/mtodd/halcyon/commit/e32e2c11efd76730ddffd1749326310781d29238</url>
  <id>e32e2c11efd76730ddffd1749326310781d29238</id>
  <committed-date>2008-09-18T23:19:27-07:00</committed-date>
  <authored-date>2008-09-18T23:19:27-07:00</authored-date>
  <message>Clients now include the Accept header field, set to prefer application/json but will fail to anything. [#62 state:resolved]</message>
  <tree>d0f744f5565c33c57a3540b7bac384b39a3ec48c</tree>
  <committer>
    <name>Matt Todd</name>
    <email>chiology@gmail.com</email>
  </committer>
</commit>
