Public
Readme
This is an example of mocking an HTTP val. Let's say that you're developing a val that responds to a POST request. That's tricky to debug and develop in the Browser preview tab, which just shows a GET request. But you can do it, because with web-standard Request & Response objects, requests and responses are values, and we can create those values ourselves.
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
tmcw-httpmockingexample.web.val.run
Updated: March 15, 2024