Skip to content

Conversation

davidgrupp
Copy link
Contributor

It can be unintuitive that you need to first specify the RequestFormat is JSON to have the RestRequest serialize data to JSON. This leads to hard to debug HTTP responses saying that the JSON format is incorrect because by default the data is serialized to XML. This is further compounded by endless suggestions on popular forums and message boards that you manually need to set the ‘Content-Type’ header to be ‘application/json’ making this a difficult product to use out of the box.

This reverts commit 182b025.
This reverts commit 182b025.
It can be unintuitive that you need to first specify the RequestFormat
is JSON to have the RestRequest serialize data to JSON. This leads to
hard to debug HTTP responses saying that the JSON format is incorrect,
because by default the data is serialized to XML. This is further
compounded by endless suggestions on popular forums and message boards
that you manually need to set the ‘Content-Type’ header to be
‘application/json’ making this a difficult product to use out of the
box.
@hallem
Copy link
Member

hallem commented Oct 18, 2014

@davidgrupp this PR can't be auto merged. can you pull the latest from master and resolve any conflicts so I can merge it in?

@davidgrupp
Copy link
Contributor Author

@hallem I mereged and the conflicts should be resolved. Thanks

hallem added a commit that referenced this pull request Oct 23, 2014
Added clearer comments for RestRequest.AddBody and additional RestRequest.AddJsonBody and RestRequest.AddXmlBody
@hallem hallem merged commit 35e4013 into restsharp:master Oct 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants