{"id":16233497,"url":"https://github.com/andrew72ru/dummy-http-server","last_synced_at":"2026-04-29T15:04:11.520Z","repository":{"id":80123257,"uuid":"250178156","full_name":"andrew72ru/dummy-http-server","owner":"andrew72ru","description":"Dummy http-server for testing purposes","archived":false,"fork":false,"pushed_at":"2023-05-17T17:10:31.000Z","size":97,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-08T07:40:30.101Z","etag":null,"topics":["php7","reactphp","symfony","symfony5"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/andrew72ru.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-26T06:24:55.000Z","updated_at":"2020-09-07T09:49:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"90bab68b-21e0-4869-84cd-d51df4171ba1","html_url":"https://github.com/andrew72ru/dummy-http-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrew72ru%2Fdummy-http-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrew72ru%2Fdummy-http-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrew72ru%2Fdummy-http-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrew72ru%2Fdummy-http-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrew72ru","download_url":"https://codeload.github.com/andrew72ru/dummy-http-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrew72ru%2Fdummy-http-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259106637,"owners_count":22805938,"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":["php7","reactphp","symfony","symfony5"],"created_at":"2024-10-10T13:12:51.793Z","updated_at":"2026-04-29T15:04:11.460Z","avatar_url":"https://github.com/andrew72ru.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Dummy http-server for testing purposes\n======================================\n\nYou can test parts of your application which calls the remote APIs with this. This service gets your http-requests and tries to read files from defined directory. The name of file (content of this file will be response) must be the same as http-request path, but every slash must will be translated as dash.\n\nIf file with this name exists, it contents will be the body of response.\n\n## How to run\n\nYou can run it directly as console command. Clone the repository and type this\n\n```shell script\nbin/console app:web-server -vv\n```\n\nThis will run server with default parameters.\n\nAlso you can run it as docker-container\n\n```shell script\ndocker run -it --rm git.crtweb.ru:4567/creative-packages/dummy-http-server/server:latest\n```\n\nor build it by yourself\n\n```shell script\ndocker build -t server:latest -f docker/Dockerfile .\n```\n\n## Parameters\n\n```\nArguments:\n  data-dir              Directory with files for responses [default: \"responses\"]\n\nOptions:\n  -p, --port[=PORT]     Port for listening [default: 8080]\n      --host[=HOST]     Interface for listening [default: \"0.0.0.0\"]\n  -h, --help            Display this help message\n  -q, --quiet           Do not output any message\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n```\n\n## Default properties\n\n- All responses will contains `Content-type: application/json` header, if you are not provide the `Accept` header with another type. If you are, response header `Content-type` will be the same as request header `Accept`.\n- If request path not have a extension (`path/to/something`, not `path/to/something.json`) the server will search file with `.json` extension.\n\n## For example\n\nRemote API have to respond with JSON like\n\n```json\n[\n    {\n      \"city\": \"New York\",\n      \"state\": \"New York\",\n      \"street\": \"Manhattan\",\n      \"is_confirmed\": true\n    }\n]\n```\n\nfor request `/api/get-confirmed-places`.\n\nPlace this json to file `responses/api-get-confirmed-places.json` (`json` is default extension for file when request has not an extension), run the server and send curl request to it:\n\n```shell script\ncurl -X POST -D - -H \"Origin: https://my-host.org\" -H \"Content-Type: application/json\" \\\n  http://localhost:8080/api/get-confirmed-places -d '{\"some-data\":\"foo-bar\"}'\n```\n\nAs you can see, the body of response is the same as contents of file.\n\nIf file with target name not will be found, you will receive the 404-response.\n\n## Future plans\n\n- [ ] Add possibility to throw exceptions from responses;\n- [ ] Add possibility to get streamed responses;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrew72ru%2Fdummy-http-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrew72ru%2Fdummy-http-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrew72ru%2Fdummy-http-server/lists"}