Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response header #49

Open
dailycommit opened this issue Nov 19, 2019 · 0 comments · Fixed by dkempner/graphql#1
Open

Response header #49

dailycommit opened this issue Nov 19, 2019 · 0 comments · Fixed by dkempner/graphql#1

Comments

@dailycommit
Copy link

How do i get "response header" like Content-Encoding ? I need to extract gzip response.

I've used code like this before for http

if resp.Header.Get("Content-Encoding") == "gzip" {
    // resp.Header.Del("Content-Length")
    zr, err := gzip.NewReader(resp.Body)
    if err != nil {
        return nil, err
    }
    resp.Body = gzreadCloser{zr, resp.Body}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant