rfesi icon indicating copy to clipboard operation
rfesi copied to clipboard

Expose response headers

Open jhelwig opened this issue 1 year ago • 2 comments

https://docs.esi.evetech.net/docs/esi_introduction.html#rules states that we should be looking at the X-ESI-Error-Limit-Remain, X-ESI-Error-Limit-Reset, and expires headers in the response, but I don't see a way to access them using rfesi. A similar issue was brought up about the x-pages header in #6.

jhelwig avatar Jan 05 '24 07:01 jhelwig

I've been thinking about how this might be possible. I don't want to append response headers to some sort of public-accessible vec, both because then I'd need to remove items, and also I don't know how I'd make the connection between request-response and headers available to the calling code, given the async nature of the HTTP calls.

I can introduce a new feature that'd change how the query function and all group functions work, so that they'd return either a tuple or struct of the actual endpoint data and the relevant headers.

Celeo avatar Feb 18 '24 19:02 Celeo

Returning a struct with the headers plus the data would make a lot of sense, and should be reasonable for people to work with, as this is what things like reqwest, and other HTTP libraries do.

jhelwig avatar Feb 19 '24 02:02 jhelwig