{"id":21179771,"url":"https://github.com/benmezger/httmock","last_synced_at":"2025-07-09T23:31:51.754Z","repository":{"id":54301817,"uuid":"294108192","full_name":"benmezger/httmock","owner":"benmezger","description":"A minimal local HTTP testing and prototyping server","archived":true,"fork":false,"pushed_at":"2021-02-25T15:07:22.000Z","size":41,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T01:17:55.038Z","etag":null,"topics":["golang","http","httpmock","httpserver","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benmezger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-09T12:36:03.000Z","updated_at":"2023-05-22T13:14:23.000Z","dependencies_parsed_at":"2022-08-13T11:30:23.979Z","dependency_job_id":null,"html_url":"https://github.com/benmezger/httmock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/benmezger/httmock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benmezger%2Fhttmock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benmezger%2Fhttmock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benmezger%2Fhttmock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benmezger%2Fhttmock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benmezger","download_url":"https://codeload.github.com/benmezger/httmock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benmezger%2Fhttmock/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264505239,"owners_count":23618909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["golang","http","httpmock","httpserver","testing-tools"],"created_at":"2024-11-20T17:34:07.761Z","updated_at":"2025-07-09T23:31:51.491Z","avatar_url":"https://github.com/benmezger.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\n`httmock` allows local testing and prototyping by mocking a HTTP server from a file based specification.\n\n## Installing\n\n1. Clone this repository: `git clone https://github.com/benmezger/httmock`:\n2. Run `make install`\n\n## Running\n\nMake sure you have a `.http.yaml` in your current directory or pass a custom filename with `--api-file`\n\n- `httmock serve` or `httmock --api-file \u003cfilename\u003e serve`\n\nUse `httmock serve --host localhost:8000` for using a different host/port.\n\n### Listing routes\n\nFor listing routes with their available params, use:\n\n- `httmock list` or `httmock --api-file \u003cfilename\u003e list`\n\n## HTTP file syntax\n\nFor an example of the file structure, see [example-http.yaml](example-http.yaml).\n\n## TODOs\n\n- Handle context base requests and responses\n\n## Example\n\nRun `httmock` with the [example](example-http.yaml) file\nThen run curl against the defined URL paths:\n\n- `curl -X GET http://localhost:8000/?name=name-param -d '{\"msg\": \"Body of GET request\"}'`\n  `{\"msg\": \"Hello, from / GET response\"}`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenmezger%2Fhttmock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenmezger%2Fhttmock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenmezger%2Fhttmock/lists"}