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

dpritchett/endless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Endless Nameless is a delayed-response HTTP(S) listener designed for testing HTTP client issues. Written in Go.

Resources

License

Stars

Watchers

Forks

Packages

No packages published