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
So my scenario is this:
I wanna mock an endpoint multiple times.
for example: '/api/v1/auth/user' will return with status 401 on the first time it's get called, but on the second time it's get called I wanna get a a different response (let's say with status 200).
While I'm able to mock the first call successfully using route.fulfill, I didn't find a way to override it on the second call.
Didn't find any documentation on the docs or on the web about it.
Is it even possible?
Thanks
The text was updated successfully, but these errors were encountered:
route will handle all the requests, not just the first one. You can put code that handles request differently every time, or you can unroute and route with the new handler.
So my scenario is this:
I wanna mock an endpoint multiple times.
for example: '/api/v1/auth/user' will return with status 401 on the first time it's get called, but on the second time it's get called I wanna get a a different response (let's say with status 200).
While I'm able to mock the first call successfully using route.fulfill, I didn't find a way to override it on the second call.
Didn't find any documentation on the docs or on the web about it.
Is it even possible?
Thanks
The text was updated successfully, but these errors were encountered: