Closed ozzyonfire closed 1 year ago
++ or request header deprecated calls
Is there any way of accessing the headers of the request?
No, there is not. The client always adds the same headers to the request. The X-Request-ID
header is not added by the client.
True. Sorry - I think I misspoke.
I actually meant accessing the headers of the response.
I thought there may be a similar mechanism to the way we get api limits back (i.e. an event on the api object) but for accessing headers.
At the moment there is no way. We could add a 'response'
event but only if there is demand for it. In the meanwhile you can add the feature in a fork and use it if you really need it.
It would be great being able to access the x-request-id as Shopify asks for it when reporting bugs
Is there any way of accessing the headers of the request?
I know if a request fails, we can see stuff in the error.response object, but this is on a successful request.
I'm having some API related issues and needed to pull the X-Request-ID header for my request.
Thanks!