Closed meirf closed 6 years ago
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?
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
.
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.
@meirf I have an implementation based on gddo available at tmthrgd/httputils if that's useful to you.
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?