我想为一个库编写一个集成测试,该库处理分块和gzip的流式http响应。
我可以使用任何服务或其他建议吗?
理想的端点或服务会:
Twitter API如果不需要帐户,那将是完美的。
也许我过度思考这个问题,请说出来,我会吃掉我不起眼的馅饼。
答案 0 :(得分:1)
看起来github.com返回chunked gzip。例如:
curl --compressed -v https://github.com/madler/zlib/commits/develop > /dev/null
...
< Server: nginx/1.0.13
< Date: Sun, 01 Apr 2012 21:32:28 GMT
< Content-Type: text/html; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Status: 200 OK
< ETag: "bae161c1cbcaa8882f8b5c6cb1d1d270"
< X-Frame-Options: deny
< X-Runtime: 107
< Set-Cookie: _gh_sess=BAh7BzoPc2Vzc2lvbl9pZCIlZjhkOWYxYzUzMzhjMTIxZTRmYjUyZTY2MWY0YWVjZGI6EF9jc3JmX3Rva2VuIjFUK2dFR1podXlTMjcralpLUmkyTkpYZzE5ZzBLS3BLODl0OTE0VEt0ZGdJPQ%3D%3D--95e44cf6b548b93a682fdefcbca6b84cb034ca8b; path=/; expires=Sat, 01-Jan-2022 00:00:00 GMT; secure; HttpOnly
< Cache-Control: private, max-age=0, must-revalidate
< Strict-Transport-Security: max-age=2592000
< Content-Encoding: gzip
<