GIScience/openrouteservice-js

Expose the response header to get the X-Ratelimit-Remaining

kf99916 opened this issue · 1 comments

In that way, we can monitor the api capacity programmatically.

Hey kf9916! The idea is good, but is would have a side effect.
The lib currenctly resolves the request promise returnig the body. As promises resolve function accepts only one value, we would have to wrap the body and the header in an object, what would be a breaking change. At this moment we think it does not worth it. But if more people ask for this than we could change our minds. We have to balance between adding new features and avoid adding breking changes.