Stubb: Build REST API mocks using your file system
1–8 of 8 posts
Re: Stubb: Build REST API mocks using your file system
#2Re: Stubb: Build REST API mocks using your file system
#3For example, imagine if all github pages had this enabled. Then, by writing the appropriate files, you could provide a REST interface to static assets in an interesting way.
I can't quite, at the moment, come up with anything I would actually USE this for, but it would be quite neat.
Re: Stubb: Build REST API mocks using your file system
#4Re: Stubb: Build REST API mocks using your file system
#5Re: Stubb: Build REST API mocks using your file system
#6Well, I think that's rather rude. Why would it mock the use of my file system?
Re: Stubb: Build REST API mocks using your file system
#7I don't get this. How do you handle POST/PUT/DELETE requests with files? It doesn't say much about it in the README.
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).