subtext

HTTP payload parsing

This module has moved and is now available at @hapi/subtext. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
Last updated 2 years ago by hueniverse .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install subtext 
SYNC missed versions from official npm registry.

subtext

HTTP payload parser.

Build Status

Lead Maintainer: Eran Hammer

subtext parses the request body and returns it in a promise.

Example

const Http = require('http');
const Subtext = require('subtext');

Http.createServer(async (request, response) => {

  const { payload, mime } = await Subtext.parse(request, null, { parse: true, output: 'data' });

  response.writeHead(200, { 'Content-Type': 'text/plain' });
  response.end(`Payload contains: ${JSON.stringify(payload)}`);

}).listen(1337, '127.0.0.1');

console.log('Server running at http://127.0.0.1:1337/');

API

See the API Reference

Current Tags

  • 6.0.12                                ...           latest (2 years ago)
  • 5.0.1                                ...           lts (2 years ago)

39 Versions

  • 6.0.12 [deprecated]           ...           2 years ago
  • 5.0.1 [deprecated]           ...           2 years ago
  • 6.0.11 [deprecated]           ...           2 years ago
  • 6.0.10 [deprecated]           ...           2 years ago
  • 6.0.9 [deprecated]           ...           2 years ago
  • 6.0.8 [deprecated]           ...           2 years ago
  • 6.0.7 [deprecated]           ...           3 years ago
  • 6.0.6 [deprecated]           ...           3 years ago
  • 6.0.5 [deprecated]           ...           3 years ago
  • 6.0.4 [deprecated]           ...           3 years ago
  • 6.0.3 [deprecated]           ...           3 years ago
  • 6.0.1 [deprecated]           ...           3 years ago
  • 6.0.0 [deprecated]           ...           3 years ago
  • 5.0.0 [deprecated]           ...           3 years ago
  • 4.4.1 [deprecated]           ...           3 years ago
  • 4.4.0 [deprecated]           ...           4 years ago
  • 4.3.0 [deprecated]           ...           4 years ago
  • 4.2.2 [deprecated]           ...           4 years ago
  • 4.2.1 [deprecated]           ...           4 years ago
  • 4.2.0 [deprecated]           ...           4 years ago
  • 4.1.0 [deprecated]           ...           4 years ago
  • 4.0.5 [deprecated]           ...           4 years ago
  • 4.0.4 [deprecated]           ...           4 years ago
  • 4.0.3 [deprecated]           ...           4 years ago
  • 4.0.2 [deprecated]           ...           4 years ago
  • 4.0.1 [deprecated]           ...           5 years ago
  • 4.0.0 [deprecated]           ...           5 years ago
  • 3.0.2 [deprecated]           ...           5 years ago
  • 3.0.1 [deprecated]           ...           5 years ago
  • 3.0.0 [deprecated]           ...           5 years ago
  • 2.0.2 [deprecated]           ...           5 years ago
  • 2.0.1 [deprecated]           ...           5 years ago
  • 2.0.0 [deprecated]           ...           5 years ago
  • 1.1.1 [deprecated]           ...           5 years ago
  • 1.1.0 [deprecated]           ...           5 years ago
  • 1.0.2 [deprecated]           ...           6 years ago
  • 1.0.1 [deprecated]           ...           6 years ago
  • 1.0.0 [deprecated]           ...           6 years ago
  • 0.0.0 [deprecated]           ...           6 years ago
Maintainers (1)
Downloads
Today 31
This Week 152
This Month 560
Last Day 78
Last Week 260
Last Month 1,682
Dependencies (6)
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |