dummyhttp1
Super simple http server that replies with a fixed body and a fixed response code
Usage
dummyhttp [{-q | --quiet}]
[{-v | --verbose}] ...
[{-p | --port}]
[{-H | --headers}]
[{-c | --code}]
[{-b | --body}]
[{-i | --interface}]
[{-d | --delay}]
[--print-completions]
[--print-manpage]
[--tls-cert]
[--tls-key]
[{-h | --help}]
[{-V | --version}]
Overview
Super simple HTTP server that replies with a fixed body and a fixed response code
Options
-
-q, --quiet -
Be quiet (log nothing)
-
-v, --verbose -
Be verbose (log data of incoming and outgoing requests). If given twice it will also log the body data
-p,--port<PORT> [default: 8080]-
Port on which to listen
-
-H, --headers <HEADERS> -
Headers to send (format: key:value)
-c,--code<CODE> [default: 200]-
HTTP status code to send
-b,--body<BODY> [default: dummyhttp]-
HTTP body to send
Supports Tera-based templating (https://tera.netlify.app/docs/) with a few additional functions over the default built-ins:
uuid() - generate a random UUID lorem(words) - generate `words` lorem ipsum words
Example: dummyhttp -b "Hello {{ uuid() }}, it's {{ now() | date(format="%Y") }} {{ lorem(words=5)}}"
-i,--interface<INTERFACE> [default: 0.0.0.0]-
Interface to bind to
-d,--delay<DELAY> [default: 0]-
Delay in milliseconds before sending the response in milliseconds
-
--print-completions <shell> -
Generate completion file for a shell
Possible values:
- •
-
bash
- •
-
elvish
- •
-
fish
- •
-
powershell
- •
-
zsh
-
--print-manpage -
Generate man page
-
--tls-cert <TLS_CERT> -
TLS certificate to use
-
--tls-key <TLS_KEY> -
TLS private key to use
-
-h, --help -
Print help (see a summary with '-h')
-
-V, --version -
Print version
Version
v1.1.3