This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

httply

0.2.0 • Public • Published

Httply

Build Status Coverage Status

A wrapper for incoming and outgoing HTTP message.

Usage

npm install --save httply
const http = require('http');
const { IncomingMessage, OutgoingMessage } = require('httply');

const server = http.createServer(async (request, response) => {
  const incoming = new IncomingMessage(request);
  const { url, method, headers } = incoming;
  const query = incoming.query;
  const rawBody = await incoming.rawBody;

  const outgoing = new OutgoingMessage({
    status: 200,
    headers: {},
    content: { hello: 'world' }
  });
  outgoing.sendBy(response);
});

/httply/

    Package Sidebar

    Install

    npm i httply

    Weekly Downloads

    1

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    6.32 kB

    Total Files

    7

    Last publish

    Collaborators

    • sartrey