1
0
Fork 0
mirror of https://github.com/rest-client/rest-client.git synced 2022-11-09 13:49:40 -05:00

accept */* but prefer xml for backward compatibility

This commit is contained in:
Adam Wiggins 2009-07-22 14:54:33 -07:00
parent 1f55b447e9
commit b2dda517e4
2 changed files with 3 additions and 3 deletions

View file

@ -232,7 +232,7 @@ module RestClient
end
def default_headers
{ :accept => 'application/xml', :accept_encoding => 'gzip, deflate' }
{ :accept => '*/*; q=0.5, application/xml', :accept_encoding => 'gzip, deflate' }
end
end
end

View file

@ -17,8 +17,8 @@ describe RestClient::Request do
@net.stub!(:verify_mode=)
end
it "requests xml mimetype" do
@request.default_headers[:accept].should == 'application/xml'
it "accept */* mimetype, preferring xml" do
@request.default_headers[:accept].should == '*/*; q=0.5, application/xml'
end
it "decodes an uncompressed result body by passing it straight through" do