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
Currently when asking the mock manager to intercept unmocked requests, it does so by making them return a 500 Internal Server Error. We may want to change this to return a 501 Not Implemented error instead.
If we do this, we should also remember to specify a Cache-Control: no-store header as 501 is implicitly cacheable.
We may also want to expose an API to test for "does this response represent an unmocked intercepted request?". One possible approach here is to subclass HTTPURLResponse and use that. Another is to return a custom header like X-PMHTTP-Mock: unmocked and then test for that.
The text was updated successfully, but these errors were encountered:
Currently when asking the mock manager to intercept unmocked requests, it does so by making them return a 500 Internal Server Error. We may want to change this to return a 501 Not Implemented error instead.
If we do this, we should also remember to specify a
Cache-Control: no-store
header as 501 is implicitly cacheable.We may also want to expose an API to test for "does this response represent an unmocked intercepted request?". One possible approach here is to subclass
HTTPURLResponse
and use that. Another is to return a custom header likeX-PMHTTP-Mock: unmocked
and then test for that.The text was updated successfully, but these errors were encountered: