Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Helps client-side Web development by mocking JSON API server.
hunk can be installed via pip or easy_install:
.. code-block:: bash
$ pip install hunk
Or:
.. code-block:: bash
$ easy_install hunk
Setup data directory and files.
For example:
.. code-block:: bash
$ tree demo/simple/
demo/simple/
|-- get
| |-- members
| | |-- 100.json
| | |-- 200.json
| | |-- 300.json
| | ...
| +-- sounds.json
|-- post
| +-- members.json
...
Move to the root directory and run hunk:
.. code-block:: bash
$ cd demo/simple/
$ hunk
* Running on http://localhost:8080/
Now, you can access Web API with HTTP:
.. code-block:: bash
$ curl http://localhost:8080/members/100
{"gender": "female", "kind": "human", "name": "Dorothy"}
$ curl http://localhost:8080/members
[{"kind": "scarecrow", "name": "Hunk"}, ...]
$ curl http://localhost:8080/sounds
[{"title": "Over The Rainbow"}, ... ]
$ curl http://localhost:8080/members -X POST
{"result": "success"}
FAQs
Mock for JSON API server.
We found that hunk 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.