Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.

Latest commit

 

History

History
40 lines (34 loc) · 1.44 KB

README.md

File metadata and controls

40 lines (34 loc) · 1.44 KB

Endless Nameless

Gobuild Download

Endless Nameless accepts any incoming HTTP requests, waits for a specified period of time, and then responds.

$ endless --port 1234 --delay 1.1 --response="*click*"
Endless nameless is now listening on port 1234 with a delay of 1.10 second(s)...
2014/06/04 11:18:50 [127.0.0.1]	GET /
2014/06/04 11:19:14 [127.0.0.1]	GET /
2014/06/04 11:19:17 [127.0.0.1]	POST /
2014/06/04 11:19:20 [127.0.0.1]	PUT /abcefg?q=things
$ curl localhost:1234
*click*

Why?

I'd like to test some HTTP request timeout settings on an API client and I needed a way to simulate slow responses.

Options

$ endless --help
Usage of endless:
  -delay=1: Wait time before sending response
  -port=8080: HTTP(s) listener port number
  -response="*click*": String response to send to clients after delay has elapsed.
  -ssl=false: Listen via HTTPS by passing --ssl.

Where

go get -u  github.com/dpritchett/endless
go install github.com/dpritchett/endless