You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tested the code you provided and there is no problem. The return value of apifox is normal.
Please check the response header!
The code logic of gin code is normal.
@RedCrazyGhost I don't know exactly all the dynamics here, but I found the problem.
My testing client has no Accept-Encoding header in the request.
With that header in the request, the response includes the Content-Encoding.
Most of HTTP clients have this Accept-Encoding set to gzip, deflate by default.
This is why I haven't this problem in other situations.
Description
c.Data
andc.DataFromReader
overwrite the set header.How to reproduce
Expectations
I expect to see the set headers in the response, but only
Content-Type
is set. I want to get alsoContent-Encoding
.Actual result
Only content type is set.
Environment
The text was updated successfully, but these errors were encountered: