0.0.4 • Published 3 years ago

echo-middleware v0.0.4

Weekly downloads
2
License
ISC
Repository
github
Last release
3 years ago

echo-middleware

npm version Node.js CI/Test

Echos back the content recieved in a web request.

Install

npm i echo-middleware

Usage/Compatibility

The servers below have been tested for compatibility and have examples:

Example

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

Tests

Run the test suite:

# Clean install dependencies
npm ci

# Run tests
npm test