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

make acceptsGzip public #65

Closed
meirf opened this issue Feb 15, 2018 · 4 comments
Closed

make acceptsGzip public #65

meirf opened this issue Feb 15, 2018 · 4 comments

Comments

@meirf
Copy link
Contributor

meirf commented Feb 15, 2018

It would make my use of this library much easier if my code can see whether the library will consider a request for possible compression.

Would making acceptsGzip -> AcceptsGzip as a pull request be welcome?

@jprobinson
Copy link
Contributor

I think this has popped up a few times so I'm into adding the option to alter the default.

Instead of making that func public, perhaps we can add a func AcceptsGzip(func(*http.Request) bool) option to let folks optionally extend it?

Would that fit your use case?

@meirf
Copy link
Contributor Author

meirf commented Feb 15, 2018

That is a slick api addition and I could see it being useful to others, but I don't have an issue with the way the library is determining compression. I just want to access the logic independently.

Feel free to change the title of this issue/repurpose/close for AcceptsGzip.

@adammck
Copy link
Contributor

adammck commented Feb 15, 2018

This is a dupe of #34 and #48, and I think the same recommendation applies. I don't see any problem with exporting the func, but there's already a better implementation in gddo.

@tmthrgd
Copy link
Contributor

tmthrgd commented Feb 17, 2018

@meirf I have an implementation based on gddo available at tmthrgd/httputils if that's useful to you.

@meirf meirf closed this as completed Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants