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:
parent
1f55b447e9
commit
b2dda517e4
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue