binance-ruby icon indicating copy to clipboard operation
binance-ruby copied to clipboard

Getting response headers

Open kurko opened this issue 4 years ago • 1 comments

With the current approach, all requests return only the response body, that is, a JSON that is converted into a hash. That means it's not possible to know information about rate limiting, cache and more.

Here's an example: https://github.com/Jakenberg/binance-ruby/blob/master/lib/binance/api/account.rb#L26-L28

Would there be interest to instead return the HTTP object and let the client call response.body, instead of prohibiting the client from accessing anything other than the HTTP body?

kurko avatar Jun 07 '21 01:06 kurko

Yeah that makes sense to me. If you'd like to put up a backwards compatible PR I'll review within a week or so.

0xjmp avatar Jan 09 '22 02:01 0xjmp