I have a fairly bog standard .net MVC 4 Web API application.
public class LogsController : ApiController
{
public HttpResponseMessage PostLog(List<
While Web API doesn't support Accept-Encoding
header out of the box, but Kiran has a terrific blog post on how to do that - http://blogs.msdn.com/b/kiranchalla/archive/2012/09/04/handling-compression-accept-encoding-sample.aspx - using a custom MessageHandler
If you implement his solution, all you need to do is issue a request with Accept-Encoding: gzip
or Accept-Encoding: deflate
header and the Web API response will be compressed in the message handler for you.