Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 715 Bytes

File metadata and controls

25 lines (20 loc) · 715 Bytes

surl

Like curl but a server. This tool lets you quickly serve a simple http-response in the same way that curl lets you do a http-request.

It allows you to serve the same response n-number of times, and the server will exit when the number of responses has been sent.

It will not filer on host or path any http-request will be served the same response.

Basic usage

surl -d '{"error_code":"-1","message":"dunno"}' \
    -H 'Content-Type: application/json' -s 500 \
    :8080
docker run -p 8080:8080 ghcr.io/thorsager/surl \
    -H "Location: https://www.google.com" \
    -s 307 \
    -d '<html><body><a href="proxy.php?url=https%3A%2F%2Fwww.google.com">google</a></body></html>' \
    :8080