# yion-body-parser

> A plugin for Yion framework : a body parser

Latest version **1.0.2** (published 2023-10-18) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install yion-body-parser
pnpm add yion-body-parser
yarn add yion-body-parser
bun add yion-body-parser
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-10-18 |
| First published | 2016-12-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kevin Balicot |
| Maintainers | kevinbalicot |

## Links

- npm: https://www.npmjs.com/package/yion-body-parser
- Repository: https://github.com/kevinbalicot/yion-body-parser
- Homepage: https://github.com/kevinbalicot/yion-body-parser#readme
- Issues: https://github.com/kevinbalicot/yion-body-parser/issues
- npm.io page: https://npm.io/package/yion-body-parser

## Dependencies (1)

- [busboy](https://npm.io/package/busboy.md) ^1.6.0

## Recent versions

- 1.0.2 (latest) — 2023-10-18
- 1.0.1 — 2023-10-16
- 1.0.0 — 2023-10-16
- 0.5.2 — 2023-01-31
- 0.5.1 — 2023-01-31
- 0.5.0 — 2021-02-15
- 0.4.3 — 2017-11-07
- 0.4.2 — 2017-04-06
- 0.4.0 — 2017-03-20
- 0.3.1 — 2017-02-27
- 0.3.0 — 2017-02-03
- 0.2.0 — 2016-12-26
- 0.1.0 — 2016-12-26

## README

# YION BODY PARSER

A body parser plugin for framework [Yion](https://www.npmjs.com/package/yion)

## Install

```
$ npm install --save yion-body-parser
```

## Usage

```javascript
const { createServer, createApp } = require('yion');
const bodyParser = require('yion-body-parser');

const app = createApp();
const server = createServer(app, [bodyParser]);

app.post('/file', (req, res) => {
    const file = req.body.file; // file sent with name "file"
    res.sendFile(file.filepath, file.filename, file.mimetype);
});
```

## API reference

File metadata :

* `filename`: file name
* `filepath`: file temporary path
* `encoding`: file encoding
* `mimetype`: file MIME type
* `length`: file length
* `data`: file's data (buffer)

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