socketry / async-http

MIT License
298 stars 45 forks source link

Demo using Protocol::HTTP::AcceptEncoding #73

Closed trevorturk closed 3 years ago

trevorturk commented 3 years ago

Description

Documentation re: https://github.com/socketry/async-http/issues/68

@ioquatix I ran into trouble testing this change -- likely I'm doing something wrong, but I found sending the headers as a hash worked, but as an array did not. I'm hoping you can have a look to see what went wrong, or what I'm doing wrong!

Types of Changes

Testing

trevorturk commented 3 years ago

This is ready to go, but I'm not sure if you'll like the documentation style with the two examples combined. Please feel free to suggest changes or of course feel free to tweak as you like!

ioquatix commented 3 years ago

You don't need to manually add the headers, it will automatically add them: https://github.com/socketry/protocol-http/blob/master/lib/protocol/http/accept_encoding.rb#L48

trevorturk commented 3 years ago

Closing since this is entirely automatic!