lostisland / sawyer

Secret User Agent of HTTP
MIT License
249 stars 75 forks source link

Option to get raw response body #52

Closed nazarhussain closed 5 years ago

nazarhussain commented 7 years ago

I came up with a use case when I need raw response body. In spite of headers set to some certain media type, response body was containing some marshalled data which was not been parsed. So in case we need to get raw body to process ourself.

nazarhussain commented 6 years ago

Any one looking on this very old PR. Any plan to merge?

technoweenie commented 5 years ago

This sounds good. Would you mind adding a basic test though?

technoweenie commented 5 years ago

I decided to merge #31 instead. I like that it's just a new property on Sawyer::Response, so it doesn't require any new #call args to use. It should work for your use case too, assuming your marshalled data isn't using a json or msgpack content type header.

Thanks for your help!