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

quinn-respond

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quinn-respond

Response generation for quinn

  • 3.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

quinn: respond

API

respond(body | { statusCode, headers, body })

Create a new QuinnResponse. The body can be a string, a buffer, or a stream. If no body is provided, it defaults to a through stream.

See the test directory for usage examples.

QuinnResponse

.status(code)

Chainable way to modify res.statusCode.

.header(name, value)

Chainable alternative to .setHeader.

.pipe(res)

Forward response to node http response.

The minimum requirement for something to be seen as an HTTP response is the presence of a setHeader method.

Helpers

respond.text(body | { statusCode, headers, body })

Same as respond but sets a text/plain content type.

respond.html(body | { statusCode, headers, body })

Same as respond but sets an text/html content type.

respond.json(data, visitor, indent)

Serialize the data and create an application/json response.

FAQs

Package last updated on 26 Oct 2014

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