I'm using the weather API from https://developer.forecast.io/docs/v2#forecast_call. In the 'Response Headers' section, they say I can use the X-Forecast-API-Calls
to get information about my API usage.
I would like to use it to count how many calls have been made to the API dynamically, and start/stop the functionality of the API accordingly in my website.
So far online I haven't been able to find any explanation to the usage of this API, so I tried looking to what 'response headers' are and how to use them.
Unfortunately, I didn't find any examples or explanations clear enough that show where to place headers in Javascript code, or in Jquery or HTML... Just as an example, the site http://code.tutsplus.com/tutorials/http-headers-for-dummies--net-8039 explains what headers are and about the Response side of it, but not how to use something like X-Forecast-API-Calls
AS a response header, or where it's included precisely.
Many sites provide wrappers/plugins/libraries that help deal with this, but I'm sure there is a way to do this without all that hassle..
Thanks.