# httplike

> library for parsing http-like protocols

Latest version **1.0.2** (published 2015-08-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install httplike
pnpm add httplike
yarn add httplike
bun add httplike
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-08-09 |
| First published | 2014-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Stephen Wan |
| Maintainers | swan |
| Keywords | http, protocol, custom |

## Links

- npm: https://www.npmjs.com/package/httplike
- Repository: https://github.com/stephen/httplike
- Issues: https://github.com/stephen/httplike/issues
- npm.io page: https://npm.io/package/httplike

## Recent versions

- 1.0.2 (latest) — 2015-08-09
- 1.0.1 — 2014-11-12
- 1.0.0 — 2014-09-05
- 0.0.9 — 2014-08-18
- 0.0.8 — 2014-05-09
- 0.0.7 — 2014-05-05
- 0.0.6 — 2014-05-04
- 0.0.5 — 2014-04-21
- 0.0.4 — 2014-04-20
- 0.0.3 — 2014-04-19
- 0.0.2 — 2014-03-29
- 0.0.1 — 2014-03-23

## README

httplike
========

[![Build Status](https://travis-ci.org/stephen/httplike.svg?branch=master)](https://travis-ci.org/stephen/httplike)

node.js package for parsing http-like protocols

## Installation
```
npm install httplike
```

## Usage
```
var Parser = require('httplike');
var p = new Parser(socket);
p.on('message', function(msg) {
  console.log(msg.method);
  console.log(msg.headers);
  console.log(msg.content);
});
```

## Protocol Assumptions

```httplike``` assumes that the incoming protocol follows HTTP standards on using the Content-Length header to determine how many bytes to wait for in a response body.

## Changelog

##### 1.0.1
- Fixed parsing involving UTF-8 characters (PR #8), and potential stall in pipelined requests (PR #9)

##### 1.0.0
- Removed ```parseHeader``` from public interface on `ClientParser` and `ServerParser`

##### 0.0.9
- Removed dependency on ```lodash```

##### 0.0.7
- Implemented built-in response object modeled after express.js response.
- Added ```trim()``` to method and headers

##### 0.0.5
- Breaking changes to how headers are accessed (```getHeader()``` function instead of ```headers[]```). See tests for example usage.

---
_Source: https://npm.io/package/httplike · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
