You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a hook on fetch response. I need both the URL and the method of the request to decide whether the hook should be called or not.
However, in the response hook, I can only get URL. Do you know where could I get the method('post', 'get', 'put', etc.) that the request is using in the response hook?
fetchIntercept.register({
response: function(response) {
if(response.url === predefinedURL && response.method /* I don't know how to get it */ === predefinedMethod) {
//do something here
}
}
});
Many Thanks
The text was updated successfully, but these errors were encountered:
I'm writing a hook on fetch response. I need both the URL and the method of the request to decide whether the hook should be called or not.
However, in the response hook, I can only get URL. Do you know where could I get the method('post', 'get', 'put', etc.) that the request is using in the response hook?
Many Thanks
The text was updated successfully, but these errors were encountered: