How can I read the HTTP response header when I do a makeWebRequest?
I do get the data and the responseCode, but the HTTP response header contains crusial information.
I am developing a widget to access my ESM-tool (Enterprise service management tool).
The API requests that return collections of records are always paginated. The default page size of 20 records can be adjusted by setting the ?per_page=
parameter. The maximum number of records per page is 100.
The information on how many pages there are, are in stored in the HTTP response header.
Also the total amount of records is stored in the HTTP response header.
So if I just want to know how many records are unassigned in my team, I need to read this information in the response header.
The tool also limits the X-RateLimit-Limit to 3600/h (number of API call you can do in an hour)..
The X-RateLimit-Remaining and the X-RateLimit-Reset are also available in the HTTP response header.