比方说,我有2个标题为“ Set-Cookie”的响应标头
.Get方法只能获取第一个值
在文件中说:
To access multiple values of a key,or to use non-canonical keys,access the map directly.
fmt.Println(headers.Get("Set-Cookie"))
// -> Can only get the first one
但是当阅读地图时
for key,value := range headers {
fmt.Println(key,value)
}
// -> cannot range over headers (type *http.Header)
目前,我不确定读取此数据的正确方法。