When calling API https://mywebsite.com/api/register through browser and it 
returns correct response from server as 
{ "error": false, "message": "Hello World" }
If we hit the same request from postman then it returns with some html 
content as Please enable JavaScript to view the page content.
Below is node side code:

var express = require("express");
var app = express();
var bodyParser = require("body-parser");
var router = express.Router();
var cors = require('cors');
app.use(cors());
app.use(bodyParser.json({limit: '50mb'}));
app.use(bodyParser.urlencoded({ limit: '50mb', "extended": false }));
router.get("/", function (req, res) {
    res.json({ 
        "error": false, "message": "Hello World" 
    });
});
app.use('/api', router);
app.listen(8990);

The api working through the browser but not with postman. 
What will be the possible errors? 
Please help. Thanks!

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/45f846b2-6c9d-4dbb-ae78-3f00272ec4ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to