Echos back the content recieved in a web request.
npm i echo-middleware
The servers below have been tested for compatibility and have examples:
Below example shows the request headers and response body from a request made to the connect example server, using HTTPie.
$ http -p Hb localhost:8080/echo
GET /echo HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: localhost:8080
User-Agent: HTTPie/2.3.0
GET /echo HTTP/1.1
host: localhost:8080
user-agent: HTTPie/2.3.0
accept-encoding: gzip, deflate
accept: */*
connection: keep-alive
Run the test suite:
# Clean install dependencies
npm ci
# Run tests
npm test