Skip to content

Commit

Permalink
Add bodyParser for raw input
Browse files Browse the repository at this point in the history
Add bodyParser middleware for accepting body as Buffer.
  • Loading branch information
prakashdivyy authored and mamaz committed Mar 12, 2019
1 parent d5dec98 commit 54686f7
Show file tree
Hide file tree
Showing 4 changed files with 3,773 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Merapi Plugin: Express

[![npm version](https://badge.fury.io/js/merapi-plugin-express.svg)](https://badge.fury.io/js/merapi-plugin-express)
[![Build Status](https://travis-ci.org/kata-ai/merapi-plugin-express.svg?branch=master)](https://travis-ci.org/kata-ai/merapi-plugin-express)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9fd74407da654907994f23ff60458858)](https://www.codacy.com/app/kata-ai/merapi-plugin-express?utm_source=github.com&utm_medium=referral&utm_content=kata-ai/merapi-plugin-express&utm_campaign=badger)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/9372644828464892a1cb29b17042a2a4)](https://www.codacy.com/app/kata-ai/merapi-plugin-express?utm_source=github.com&utm_medium=referral&utm_content=kata-ai/merapi-plugin-express&utm_campaign=Badge_Coverage)
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module.exports = function (merapi) {

app.use(bodyParser.json(bodyParserOptions));
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.raw({ type: "*/*" }));

let isRoutesInMiddleware = false;

Expand Down Expand Up @@ -62,4 +63,4 @@ module.exports = function (merapi) {
}
}
};
};
};
Loading

0 comments on commit 54686f7

Please sign in to comment.