Comments on: Posting compressed JSON Content to ASP.NET Web API Controller https://blog.kaliatech.com/2013/02/posting-compressed-json-content-to-asp-net-web-api-controller/ Required reading IMO. Wed, 31 Jan 2018 18:36:00 +0000 hourly 1 https://wordpress.org/?v=4.9.8 By: Dan https://blog.kaliatech.com/2013/02/posting-compressed-json-content-to-asp-net-web-api-controller/#comment-996 Wed, 19 Jun 2013 00:26:00 +0000 http://blog.kaliatech.com/?p=242#comment-996 Thank you for your help and fast response.
I will give it a try

]]>
By: kaliatech https://blog.kaliatech.com/2013/02/posting-compressed-json-content-to-asp-net-web-api-controller/#comment-995 Wed, 19 Jun 2013 00:19:00 +0000 http://blog.kaliatech.com/?p=242#comment-995 I was using a Java client at the time, although I know another member of the team is using a .NET client currently. I doubt the .NET HttpClient has built-in support , but whatever http client you are using, it should be straightforward matter of setting the correct content type header and gzipping the json text into a byte array/stream that then gets sent in the POST body. In .NET the GZipStream class handles the compression. There are a few posts on the Internet showing how to do this with HttpClient. Example: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/a74324dd-1508-495b-bcd4-0ae99a7ff16d/sending-compressed-content-with-httpclient

]]>
By: Dan https://blog.kaliatech.com/2013/02/posting-compressed-json-content-to-asp-net-web-api-controller/#comment-994 Wed, 19 Jun 2013 00:02:00 +0000 http://blog.kaliatech.com/?p=242#comment-994 Hi

What code did you use for sending the compressed content from the client?

Is it possible to have HttpClient send compressed content from the client?
I already have a HttpClient that attaches a client certificate for authentication but do not know how to change the code to have compression
Thanks

]]>
By: kaliatech https://blog.kaliatech.com/2013/02/posting-compressed-json-content-to-asp-net-web-api-controller/#comment-990 Fri, 31 May 2013 16:10:00 +0000 http://blog.kaliatech.com/?p=242#comment-990 Are you able to post without the compression? I would make sure that works first. Did you add the GZipToJsonHandler message handler correctly? (I edited my post to include that line in WebApiConfig.cs). If still having issues, consider posting a question to stackoverflow. However, you will need to provide more information regarding your setup.

]]>
By: Hannaan https://blog.kaliatech.com/2013/02/posting-compressed-json-content-to-asp-net-web-api-controller/#comment-989 Fri, 31 May 2013 16:02:00 +0000 http://blog.kaliatech.com/?p=242#comment-989 Any help/suggestions ?

]]>
By: Hannaan https://blog.kaliatech.com/2013/02/posting-compressed-json-content-to-asp-net-web-api-controller/#comment-988 Fri, 31 May 2013 15:57:00 +0000 http://blog.kaliatech.com/?p=242#comment-988 My model in my api controller is null after the decompression

]]>
By: El Tori https://blog.kaliatech.com/2013/02/posting-compressed-json-content-to-asp-net-web-api-controller/#comment-986 Thu, 28 Feb 2013 17:04:00 +0000 http://blog.kaliatech.com/?p=242#comment-986 Useful!!! Thanks 😀

]]>