Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

http-echo

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-echo

Echo a specific HTTP response back, controlled by URL querystring parameters.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

http-echo

A simple node.js HTTP server for testing that will echo back a response, which you can control by passing querystring parameters.

The server will response to any URL.

Available parameters

  • status: HTTP status code to send back. Defaults to 200.
  • contentType: MIME type to send back in the Content-Type header. Defaults to 'text/plain'.
  • body: The body to send back in the response. Defaults to 'hello there!'.

Example request and response

Request:

GET http://localhost:3000/mytest?status=500&contentType=application/json&body={"error":"a message!"}

Response:

HTTP/1.1 500 Internal Server Error
Content-Type: application/json
Content-Length: 20
Date: Wed, 10 Apr 2013 21:05:18 GMT
Connection: keep-alive

{"error":"a message!"}

FAQs

Package last updated on 10 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc