
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Simple mock server for REST and XML-RPC API
It can mock GET, POST, PUT, PATCH, DELETE and some more rarely used HTTP methods.
Build status at Travis CI <http://travis-ci.org/>
_: |travis|
.. |travis| image:: https://travis-ci.org/tomashanacek/mock-server.png?branch=master :target: https://travis-ci.org/tomashanacek/mock-server
http://demo.mockapi.org/__manage
Install with pip::
$ pip install mock-server
Or install with easy_install::
$ easy_install mock-server
And after run::
$ mock-server --dir=/path/to/api
It will be listening on port 8888 and wait for your HTTP requests.
| For create mock for url path go to: | | http://localhost:8888/__manage/create |
Mocked GET /user/tom::
$ curl -v -X GET http://demo.mockapi.org/user/tom
> GET /user/tom HTTP/1.1
> Host: demo.mockapi.org
> Accept: */*
>
< HTTP/1.1 200 OK
< Access-Control-Allow-Origin: *
< Content-Type: application/json; charset=utf-8
< Content-Length: 64
< Server: TornadoServer/2.4.1
<
{
"name": "Tom",
"surname": "Smith",
"age": 22
}
https://packaging.python.org/tutorials/packaging-projects/
response content format: %METHOD%_%STATUS%.%FORMAT%
response headers format: %METHOD%_H_%STATUS%.%FORMAT%
::
root_dir/
GET_200.json # response content for GET /
GET_H_200.json # headers for GET /
user/
DELETE_404.xml # response content for DELETE /user.xml?__statusCode=404
POST_200.json # response content for POST /user
POST_H_200.json # headers for POST /user
If you have any trouble, report bug at GitHub Issue https://github.com/tomashanacek/mock-server/issues
William Zhang
Many thanks to @bopo and @krmaxwell
Many thanks to @eduardosan and @winkidney
No notes on earlier releases.
FAQs
Simple mock server for REST API
We found that mock-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.