go-zero
go-zero copied to clipboard
I hope that httpc can use the api format to parse the return value according to the returned structure definition.
we use the repeated code to parser the response, can gozero use the api format to parse the return value according to the returned structure definition?
if http.StatusOK != httpRsp.StatusCode {
return nil, fmt.Errorf("http staus code: %d", httpRsp.StatusCode)
}
rspData, err := ioutil.ReadAll(httpRsp.Body)
var bodyRsp Response
err = jsonx.Unmarshal(rspData, &bodyRsp)
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.