Quick and dirty HTTP response mocker based on plain text files written in PHP.
- Copy mockhttp.php to any PHP-enabled web server folder
- Set up URL rewriting. Example .htaccess file for Apache is included.
- Crear .txt files in the same folder or in subfolders and you're good to go
If your mock file is at project1/mock1.txt you should access it as:
http://yourserver.com/project1/mock1
If you're using a subfolder instead of the document root for serving your mocks:
http://yourserver.com/path/to/subfolder/project1/mock1
Here is a CLI example using cURL:
$ curl -vv http://yourserver.com/project1/mock1
(c) Antonio Ognio antonio@ognio.com