http请求支持headerTransfer-Encoding: chunke?

发布于 8 年前作者 yanlai1874 次浏览最后编辑 8 年前来自 ask

请问会支持http request header Transfer-Encoding: chunke吗?golang 特殊reader会不支持length。(https://github.com/golang/go/blob/master/src/net/http/request.go#L833)。当无法读取length后会直接使用Transfer-Encoding: chunke。接口服务器会返回http 503。

报文示例:

POST /wxa/getwxacodeunlimit?access_token=1 HTTP/1.1


Accept: */*


host: api.weixin.qq.com

Transfer-Encoding: chunked

{x: 1}

1 回复
zyao
zyao1 楼6 年前

不知道为什么会有换行

```

host: api.weixin.qq.com

Transfer-Encoding: chunked

```