JSON REST Service: Content-Encoding: gzip

后端 未结 2 784
春和景丽
春和景丽 2020-12-21 07:24

I am writing some code to interface with a service that I do not have yet, so I am writing a simulator to attempt to de-risk some of the problems I might run into when I get

相关标签:
2条回答
  • 2020-12-21 07:26

    You're correct. Just Gzip the JSON string and return it.

    Best reference for any REST implementation is the HTTP/1.1 RFC: http://tools.ietf.org/html/rfc2616

    0 讨论(0)
  • 2020-12-21 07:33

    In short: yes, it's as simple as that. The response body just needs to be the gzip-compressed version of the normal response body.

    This question may have some useful information for setting up your service.

    0 讨论(0)
提交回复
热议问题