3 ms·
Well, this is only for stubbing an API, you don’t build an actual API, so nothing in the filesystem is changed when you PUT, POST or DELETE. What does change t
by knuton 14y ago
Well, this is only for stubbing an API, you don’t build an actual API, so nothing in the filesystem is changed when you PUT, POST or DELETE.
What does change though is the state in the working memory, specifically in the stubb server process, by means of which you can change the response by using the response sequences described in the README. You might for example test a client-side deletion procedure, so you specify a stalling response sequence with two members. Your first DELETE request to /photos/5 will be responded to with the content described in the first sequence member (say 200 OK), while all further requests will be responded to with the content described in the second sequence member (say 404 NOT FOUND, using YAML frontmatter for specifying the HTTP status).