mwunsch / weary

A framework and DSL for building RESTful web service clients
MIT License
480 stars 23 forks source link

Enable gzip for weary #27

Closed TonsOfFun closed 10 years ago

TonsOfFun commented 11 years ago

I have tried adding 'Accept-Encoding' => 'gzip,deflate' to the weary request object's headers hash and the response comes back compressed, but weary doesn't decompress it. I have to manually read the response using Zlib::GzipReader and that just doesn't feel right. Is there a way to get Weary to handle gzip compression?

TonsOfFun commented 11 years ago

Works with adapter Weary::Adapter::Typhoeus

mwunsch commented 11 years ago

Try inserting the Rack::Deflater middleware into your stack, and let me know if that works?

fbjork commented 11 years ago

I have Rack::Deflater in the stack already, still doesn't work.

mwunsch commented 11 years ago

hmm, might need to do some work in the Net::HTTP adapter, but if typhoeus works for you it might be moot?

TonsOfFun commented 11 years ago

So, I am using weary to make calls from one of our services to another. it works in development on my local machine, but not if I point it at one of the servers using SSL. Are there known issues with this adapter and https connections?

mwunsch commented 11 years ago

@TonsOfFun Not that I'm aware of. Could you open a separate issue w/ more detail?

edit: Unless, of course, the two seem to related. More information plz! :grin: