can u make a request using curl? does it return the expected result?

On 17 August 2017 at 08:01, Avinash Kadam <[email protected]> wrote:

> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/nodejs/45f846b2-6c9d-4dbb-ae78-3f00272ec4ff%40googlegroups.com
> <https://groups.google.com/d/msgid/nodejs/45f846b2-6c9d-4dbb-ae78-3f00272ec4ff%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[]'s

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAET7tnYz70MFstLKc%3DEtJ2f6d3hs3tP%3Dw9GTDq0gViGEvJ75jQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to