我对API进行了GET调用,调用应该不会返回任何数据:
浏览器(和嗅探器)给我200-OK响应null
正文文本
wp_remote_get()
给我200-OK响应,字符串为binary garbage 作为主体从哪里开始戳HTTP API,以找出它最终以垃圾告终的原因?
以下是完整响应数据的转储:
array
\'headers\' =>
array
\'date\' => string \'Tue, 22 Feb 2011 16:51:03 GMT\' (length=29)
\'server\' => string \'Apache/2.2.3 (Red Hat)\' (length=22)
\'x-powered-by\' => string \'PHP/5.2.16\' (length=10)
\'content-encoding\' => string \'deflate\' (length=7)
\'vary\' => string \'Accept-Encoding\' (length=15)
\'content-length\' => string \'17\' (length=2)
\'connection\' => string \'close\' (length=5)
\'content-type\' => string \'application/json; charset=utf-8\' (length=31)
\'body\' => string \'x��+��������_\' (length=17)
\'response\' =>
array
\'code\' => int 200
\'message\' => string \'OK\' (length=2)
\'cookies\' =>
array
empty