JavierSolis / resting

Automatically exported from code.google.com/p/resting
0 stars 0 forks source link

All requests add header "Accept:text/xml" by default #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Using Resting.get(....) or Resting.getByJSON(...) always sets the 
Accept:text/xml header. When accessing a JSON api this could mean a response of 
406: Not accepted.

What is the expected output? What do you see instead?
Expect accept type not to be set on Resting.get(), and text/json for 
Resting.getByJSON().

Original issue reported on code.google.com by jeremy.s...@gmail.com on 2 Aug 2011 at 6:19

GoogleCodeExporter commented 9 years ago
Fixed. Patch, test report and system output attached.

Sujata, review and close.

Original comment by lpriyapa...@gmail.com on 3 Aug 2011 at 12:34

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed by removing all accept headers. By default, all types of responses will 
be accepted. The user can pass custom headers (accept as well as other types) 
if required.

Original comment by sujata...@gmail.com on 11 Aug 2011 at 1:53