go-zero
go-zero copied to clipboard
When the content type is not standard can not reader the params
The request header from others
The Api description
type DeviceInfo {
DevName string `json:"dev_name"` //设备名称
Ip string `json:"ip"` //设备ip
Sn string `json:"sn"` //设备序号
}
Expected behavior
In this case we can not get body params . I has checked the code in package. we use the application/json as Json header only .
`
**Environments **
- go-zero version [1.5.3]
I has setup the header to application/json manuly before read body as the temporary solution.
Can do something compatible from the header ? because we dont know others api is standard or not
You mean with upper case J?
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.