Skip to content

Commit d9fe157

Browse files
committed
Merge pull request #422 from braydonf/urlencoded
Fixed bug with parsing urlencoded post data.
2 parents ea57755 + 27ee62b commit d9fe157

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: lib/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict';
22

3+
var bodyParser = require('body-parser');
34
var BaseService = require('./service');
45
var inherits = require('util').inherits;
56
var BlockController = require('./blocks');
@@ -86,6 +87,8 @@ InsightAPI.prototype.start = function(callback) {
8687

8788
InsightAPI.prototype.setupRoutes = function(app) {
8889

90+
app.use(bodyParser.urlencoded({extended: true}));
91+
8992
//Enable CORS
9093
app.use(function(req, res, next) {
9194
res.header('Access-Control-Allow-Origin', '*');

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"async": "*",
6464
"bitcore-lib": "^0.13.7",
6565
"bitcore-message": "^1.0.1",
66+
"body-parser": "^1.13.3",
6667
"lodash": "^2.4.1",
6768
"request": "^2.64.0"
6869
},

0 commit comments

Comments
 (0)