# Parsing body and header

**URL:** <https://forums.fusetools.com/t/parsing-body-and-header/5890>\
**Category:** How-to Discussions\
**Created:** [July 30, 2016, 6:32pm UTC](https://forums.fusetools.com/t/parsing-body-and-header/5890 "2016-07-30T18:32:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom1](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@Tom1](https://forums.fusetools.com/u/Tom1)\
**Post date:** [July 30, 2016, 6:32pm UTC](https://forums.fusetools.com/t/parsing-body-and-header/5890/1 "2016-07-30T18:32:56Z")

</div>

Hi there, I am trying to login to [backendless.com](http://backendless.com) via REST api. Below is my code. On Fuse debug console I didn’t see anything, not even errors. Whenever I test via POSTMAN it response back. Anything wrong with parsing header or body?

```auto
    function login_clicked()
    {
        fetch('http://api.backendless.com/v1/users/login&#39;,
        {
            method: 'POST',
            headers: {
                    "application-id": authKeys.appID,
                    "secret-key": authKeys.appSecrete,
                    "Content-type": "application/json",
                    "application-type": "REST"
                    },
            body: JSON.stringify({
                "name":"admin",
                "password":"admin123"
            })
        })
        .then(function(result){
            if(result.status !== 200){
                console.log("Something went wrong" + result);
                return ;
            }
            return result.json();
        })
        .then(function(responseObject){
            console.log("------------");
            console.log(JSON.stringify(responseObject));
            console.log("**");
        });
    }

```

---

<div class="post-metadata">

**Author:** ![Vegard\_Strand\_Lende](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/vegard_strand_lende/32/349_2.png) [@Vegard\_Strand\_Lende](https://forums.fusetools.com/u/Vegard_Strand_Lende)\
**Post date:** [August 3, 2016, 12:03pm UTC](https://forums.fusetools.com/t/parsing-body-and-header/5890/2 "2016-08-03T12:03:53Z")

</div>

Hi!

If the fetch fails are you catching the error? Try to add a `.catch(function(err) { console.log(err); })` to see if and why it fails
