echo-middleware

0.0.4 • Public • Published

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

Package Sidebar

Install

npm i echo-middleware

Weekly Downloads

4

Version

0.0.4

License

ISC

Unpacked Size

7.04 kB

Total Files

10

Last publish

Collaborators

  • keirany