{"id":23957124,"url":"https://github.com/yaxingson/httpmock","last_synced_at":"2026-02-27T20:41:09.800Z","repository":{"id":253758364,"uuid":"844404698","full_name":"yaxingson/httpmock","owner":"yaxingson","description":"Mock a full fake REST API and provides HTTP request and response services","archived":false,"fork":false,"pushed_at":"2024-11-18T07:32:50.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T12:54:05.078Z","etag":null,"topics":["mock","restful-api","services"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yaxingson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-19T07:35:33.000Z","updated_at":"2024-11-27T09:13:29.000Z","dependencies_parsed_at":"2025-01-06T16:40:53.957Z","dependency_job_id":"35ddc85e-fa9f-4618-87cb-b11c0c30ab5c","html_url":"https://github.com/yaxingson/httpmock","commit_stats":null,"previous_names":["soetas/node-http-server","yaseensun/httpmock","gavosun/httpmock","yaxingson/httpmock"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yaxingson/httpmock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaxingson%2Fhttpmock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaxingson%2Fhttpmock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaxingson%2Fhttpmock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaxingson%2Fhttpmock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaxingson","download_url":"https://codeload.github.com/yaxingson/httpmock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaxingson%2Fhttpmock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29912558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"ssl_error","status_checked_at":"2026-02-27T19:37:41.463Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mock","restful-api","services"],"created_at":"2025-01-06T16:40:14.030Z","updated_at":"2026-02-27T20:41:09.782Z","avatar_url":"https://github.com/yaxingson.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e officially deployed at https://httpmock.org\n\n## Install\n\n```shell\n\u003e npm i httpmock.org --g\n\n```\n\n## Usage\n\nCreate a `db.json`、`db.json5` or `db.js` file:\n\n```json\n{\n\t\"posts\":[\n\t\t{\n\t    \"userId\": 1,\n\t    \"id\": 1,\n\t    \"title\": \"sunt aut facere repellat provident\",\n\t    \"body\": \"quia et suscipit suscipit recusandae consequuntur expedita et cum reprehenderit\"\n\t  },\n\t  {\n\t    \"userId\": 1,\n\t    \"id\": 2,\n\t    \"title\": \"qui est esse\",\n\t    \"body\": \"est rerum tempore vitae sequi sint nihil reprehenderit dolor beatae\"\n\t  }\n\t],\n\t\"users\":[\n\t\t{\n\t    \"id\": 1,\n\t    \"name\": \"Leanne Graham\",\n\t    \"username\": \"Bret\",\n\t    \"email\": \"Sincere@april.biz\"\n\t  }\n\t],\n\t\"todos\":[\n\t\t{\n\t    \"userId\": 1,\n\t    \"id\": 1,\n\t    \"title\": \"delectus aut autem\",\n\t    \"completed\": false\n\t  },\n\t  {\n\t    \"userId\": 1,\n\t    \"id\": 2,\n\t    \"title\": \"quis ut nam facilis et officia qui\",\n\t    \"completed\": false\n\t  }\n\t]\n}\n\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eview json5 format\u003c/summary\u003e\n\n```json5\n{\n\tposts:[\n\t\t{\n\t    userId: 1,\n\t    id: 1,\n\t    title: \"sunt aut facere repellat provident\",\n\t    body: \"quia et suscipit suscipit recusandae consequuntur expedita et cum reprehenderit\"\n\t  },\n\t  {\n\t    userId: 1,\n\t    id: 2,\n\t    title: \"qui est esse\",\n\t    body: \"est rerum tempore vitae sequi sint nihil reprehenderit dolor beatae\"\n\t  }\n\t],\n\tusers:[\n\t\t{\n\t    id: 1,\n\t    name: \"Leanne Graham\",\n\t    username: \"Bret\",\n\t    email: \"Sincere@april.biz\"\n\t  }\n\t],\n\ttodos:[\n\t\t{\n\t    userId: 1,\n\t    id: 1,\n\t    title: \"delectus aut autem\",\n\t    completed: false\n\t  },\n\t  {\n\t    userId\": 1,\n\t    id\": 2,\n\t    title: \"quis ut nam facilis et officia qui\",\n\t    completed: false\n\t  }\n\t]\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eview js format\u003c/summary\u003e\n\n```js\nexport default {\n\t\tposts:[\n\t\t{\n\t    userId: 1,\n\t    id: 1,\n\t    title: \"sunt aut facere repellat provident\",\n\t    body: \"quia et suscipit suscipit recusandae consequuntur expedita et cum reprehenderit\"\n\t  },\n\t  {\n\t    userId: 1,\n\t    id: 2,\n\t    title: \"qui est esse\",\n\t    body: \"est rerum tempore vitae sequi sint nihil reprehenderit dolor beatae\"\n\t  }\n\t],\n\tusers:[\n\t\t{\n\t    id: 1,\n\t    name: \"Leanne Graham\",\n\t    username: \"Bret\",\n\t    email: \"Sincere@april.biz\"\n\t  }\n\t],\n\ttodos:[\n\t\t{\n\t    userId: 1,\n\t    id: 1,\n\t    title: \"delectus aut autem\",\n\t    completed: false\n\t  },\n\t  {\n\t    userId\": 1,\n\t    id\": 2,\n\t    title: \"quis ut nam facilis et officia qui\",\n\t    completed: false\n\t  }\n\t]\n}\n```\n\u003c/details\u003e\n\n```shell\n\u003e httpmock db.json\n\n# npx\n\u003e npx httpmock db.json\n\n```\n\nBased on the example db.json, you'll get the following routes:\n\n```mermaid\nflowchart TD\n  GET ---\u003e   /posts\n  GET ---\u003e   /posts/:id\n  POST ---\u003e   /posts\n  PUT ---\u003e    /posts/:id\n  PATCH ---\u003e  /posts/:id\n  DELETE ---\u003e /posts/:id\n\n```\n\nURL params:\n\n- Conditions: `eq`、`lt`、`lte`、`gt`、`gte` and `ne`\n\n- Range: `start`、`end` and `limit`\n\n- Paginate: `page` and `per_page`(default = 10)\n\n- Sort: `sort` and `reverse`\n\n- Nested and array fields: `x.y.z` and `x.y.z[i]`\n\n- Embed\n\n## Configuration\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaxingson%2Fhttpmock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaxingson%2Fhttpmock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaxingson%2Fhttpmock/lists"}