Skip to content

Conversation

@pvivera
Copy link

@pvivera pvivera commented Oct 22, 2013

By default when you add a body to a request, a header with Content-Type and application/json is added too.

@subnetmarco
Copy link
Member

What if the user wants to submit a body that's not a JSON body but, for example, binary?

@pvivera
Copy link
Author

pvivera commented Oct 23, 2013

Yes, it's a possibility but regarding this code https://github.com/Mashape/unirest-net/blob/master/unirest-net/unirest-net/src/request/HttpRequest.cs#L184-187 every time that you add an object in the body is serialized as JSON.

@subnetmarco
Copy link
Member

@pvivera this is definitely a bug, thanks for pointing it out. The client should allow an arbitrary body to be sent, without serializing it to JSON first.

@subnetmarco
Copy link
Member

I've noticed there were some major updates to the library, I didn't have the chance to test the library, but I don't see any automatic JSON encoding in the code anymore.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants