{"id":15637972,"url":"https://github.com/svenstaro/dummyhttp","last_synced_at":"2025-05-16T11:07:10.028Z","repository":{"id":32546605,"uuid":"136726799","full_name":"svenstaro/dummyhttp","owner":"svenstaro","description":"Super simple HTTP server that replies a fixed body with a fixed response code","archived":false,"fork":false,"pushed_at":"2025-05-02T23:37:23.000Z","size":1305,"stargazers_count":115,"open_issues_count":3,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-03T00:27:30.327Z","etag":null,"topics":["dummy","fake","http","http-server","mocking","server","testing"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/svenstaro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2018-06-09T13:44:35.000Z","updated_at":"2025-05-02T23:37:19.000Z","dependencies_parsed_at":"2023-11-28T09:28:46.037Z","dependency_job_id":"4432737e-8281-4f82-a6b8-33f0471ff774","html_url":"https://github.com/svenstaro/dummyhttp","commit_stats":{"total_commits":410,"total_committers":5,"mean_commits":82.0,"dds":0.5560975609756098,"last_synced_commit":"bdebb63516a2e1b56fa9e99ac6a8772c3640dea9"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenstaro%2Fdummyhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenstaro%2Fdummyhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenstaro%2Fdummyhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenstaro%2Fdummyhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svenstaro","download_url":"https://codeload.github.com/svenstaro/dummyhttp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518378,"owners_count":22084374,"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":["dummy","fake","http","http-server","mocking","server","testing"],"created_at":"2024-10-03T11:16:37.848Z","updated_at":"2025-05-16T11:07:06.435Z","avatar_url":"https://github.com/svenstaro.png","language":"Rust","readme":"# dummyhttp\n\n[![CI](https://github.com/svenstaro/dummyhttp/workflows/CI/badge.svg)](https://github.com/svenstaro/dummyhttp/actions)\n[![Docker Hub](https://img.shields.io/docker/pulls/svenstaro/dummyhttp)](https://cloud.docker.com/repository/docker/svenstaro/dummyhttp/)\n[![Crates.io](https://img.shields.io/crates/v/dummyhttp.svg)](https://crates.io/crates/dummyhttp)\n[![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/svenstaro/dummyhttp/blob/master/LICENSE)\n[![Lines of Code](https://tokei.rs/b1/github/svenstaro/dummyhttp)](https://github.com/svenstaro/dummyhttp)\n\n**A super simple HTTP server that replies with a fixed body and a fixed response code**\n\nThis is a simple, small, self-contained, cross-platform CLI tool for debugging\nand testing.\nIt allows you to return arbitrary HTTP responses and log incoming request data.\nHTTP/2 support included.\n\n## How to use\n\n### Log all incoming request data\n\nRunning `dummyhttp -vv` results in this neat output:\n\n![Pretty log](pretty_log.png)\n\n### Running with no arguments always returns 200 on all interfaces at port 8080\n\n    dummyhttp\n    curl -v localhost:8080\n    # \u003c HTTP/1.1 200 OK\n    # \u003c content-length: 10\n    # \u003c date: Sat, 09 Jun 2018 13:56:14 GMT\n    # \u003c\n    # dummyhttp\n\n### Always emit 400 Bad Request\n\n    dummyhttp -c 400\n    curl -v localhost:8080\n    # \u003c HTTP/1.1 400 Bad Request\n    # \u003c content-length: 10\n    # \u003c date: Sat, 09 Jun 2018 13:57:53 GMT\n    # \u003c\n    # dummyhttp\n\n### Always return a certain string\n\n    dummyhttp -b \"Hello World\"\n    curl -v localhost:8080\n    # \u003c HTTP/1.1 200 OK\n    # \u003c content-length: 12\n    # \u003c date: Sat, 09 Jun 2018 13:58:57 GMT\n    # \u003c\n    # Hello World\n\n### Return a specific header\n\n    dummyhttp -b '{\"Hello\": \"World\"}' -H \"content-type:application/json\"\n    curl -v localhost:8080\n    # \u003c HTTP/1.1 200 OK\n    # \u003c content-type: application/json\n    # \u003c date: Wed, 24 Aug 2022 00:55:35 +0200\n    # \u003c content-length: 18\n    # \u003c\n    # {\"Hello\": \"World\"}\n\n## How to install\n\n**Static builds**: These offered for **Linux**, **OSX**, and **Windows** in various architectures over at the [the releases page](https://github.com/svenstaro/dummyhttp/releases).\nGrab a binary corresponding to your architecture.\n\nOn Linux and OSX, you need to run `chmod +x` on the binary to be able to run it. For example:\n\n    chmod +x dummyhttp-1.0.2-x86_64-unknown-linux-musl\n\nAfterwards, you can run it:\n\n    ./dummyhttp-1.0.2-x86_64-unknown-linux-musl\n\n**With Cargo**: If you have a somewhat recent version of Rust and Cargo installed, you can run\n\n    cargo install dummyhttp\n    dummyhttp\n\n## Full options\n\n    Super simple HTTP server that replies with a fixed body and a fixed response code\n\n    Usage: dummyhttp [OPTIONS]\n\n    Options:\n      -q, --quiet\n              Be quiet (log nothing)\n\n      -v, --verbose...\n              Be verbose (log data of incoming and outgoing requests). If given twice it will also log the body data\n\n      -p, --port \u003cPORT\u003e\n              Port on which to listen\n\n              [default: 8080]\n\n      -H, --headers \u003cHEADERS\u003e\n              Headers to send (format: key:value)\n\n      -c, --code \u003cCODE\u003e\n              HTTP status code to send\n\n              [default: 200]\n\n      -b, --body \u003cBODY\u003e\n              HTTP body to send\n\n              Supports Tera-based templating (https://tera.netlify.app/docs/) with a few additional\n              functions over the default built-ins:\n\n              uuid() - generate a random UUID\n              lorem(words) - generate `words` lorem ipsum words\n\n              Example: dummyhttp -b \"Hello {{ uuid() }}, it's {{ now() | date(format=\"%Y\") }} {{ lorem(words=5)}}\"\n\n              [default: dummyhttp]\n\n      -i, --interface \u003cINTERFACE\u003e\n              Interface to bind to\n\n              [default: 0.0.0.0]\n\n      -d, --delay \u003cDELAY\u003e\n              Delay in milliseconds before sending the response in milliseconds\n\n              [default: 0]\n\n          --print-completions \u003cshell\u003e\n              Generate completion file for a shell\n\n              [possible values: bash, elvish, fish, powershell, zsh]\n\n          --print-manpage\n              Generate man page\n\n          --tls-cert \u003cTLS_CERT\u003e\n              TLS certificate to use\n\n          --tls-key \u003cTLS_KEY\u003e\n              TLS private key to use\n\n      -h, --help\n              Print help (see a summary with '-h')\n\n      -V, --version\n              Print version\n\n## Releasing\n\nThis is mostly a note for me on how to release this thing:\n\n- Make sure `CHANGELOG.md` is up to date.\n- `cargo release \u003cversion\u003e`\n- `cargo release --execute \u003cversion\u003e`\n- Releases will automatically be deployed by GitHub Actions.\n- Update Arch package.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvenstaro%2Fdummyhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvenstaro%2Fdummyhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvenstaro%2Fdummyhttp/lists"}