httpEffect 502 Bad Gatewat

Woz1
Giga Contributor

Hello,

I have written a component which I am using to pull back 10 incidents just to get my head around components and such. I followed this guide but it was riddled with errors -> 

 https://developer.servicenow.com/dev.do#!/guides/orlando/now-experience/ui-framework/recipes/http-ef...

 

The below code from my index.js is fired on a button click. note: there is my full URL in as the first param of createHttpEffect. 

// Get 10 users from the sys_user table
const fetchUsers = createHttpEffect('https://dev007.service-now.com/api/now/table/incident?sysparm_limit=10', {
	method: 'GET',
	successActionType: USER_FETCH_SUCCEEDED,
	headers: {
		"Authorization": "Basic " + auth
	},
});

This is from my now-cli.json

  "development": {
    "proxy": {
        "origin": "dev007.service-now.com",
        "proxies": ["/api"]
    }
}

The error I am getting is below.

I dont understand why its using POST or why its trying to access localhost any help would be great 

find_real_file.png

2 REPLIES 2

Woz1
Giga Contributor
This is now resolved It was using POST because batch was turned on and once that was off the URL was picked up 🙂

You should post your solution and then mark it as the answer so others know what you did to fix this error.