socketry / async-http

MIT License
298 stars 45 forks source link

Consider `Async::HTTP::Internet` should use `Protocol::HTTP::AcceptEncoding` by default. #68

Closed ioquatix closed 3 years ago

ioquatix commented 3 years ago

This was a hack we used to PoC:

class Internet < Async::HTTP::Internet
    def client_for(endpoint)
        Protocol::HTTP::AcceptEncoding.new(super).tap do |middleware|
            def middleware.scheme
                "https"
            end
        end
    end
end