$ajax redirect issue
Posted: 17:12, 02 Mar 2016
Hello,
I have modified the example TI CC2650 sensor demo so that it makes an ajax call to a REST web service under certain conditions. I have confirmed the web service runs (it creates a WorkOrder in the system), but the ajax call always executes the 'error' call back - not the 'success' callback. The response does not contain the expected json message.
This is the response from the error callback:
{"readyState":0,"responseText":"","status":0,"statusText":"error"}
[EDIT]
Some additional information: the jqXHR.state() is 'rejected'
In the error callback I added a log message for location.href:
LOG: location.href: https://us-west-2-deploy.evothings.com/hyper/..... /index.html
/[EDIT]
I have tested the web service call with SOAPUI and it always completes successfully and returns the expected json message.
From my investigation I suspect that this has something to do with a redirect - or with access-control-allow-origin.
Can anyone provide a suggestion to overcome this issue? Or to further confirm the nature of the error?
Thank you,
- David
I have modified the example TI CC2650 sensor demo so that it makes an ajax call to a REST web service under certain conditions. I have confirmed the web service runs (it creates a WorkOrder in the system), but the ajax call always executes the 'error' call back - not the 'success' callback. The response does not contain the expected json message.
This is the response from the error callback:
{"readyState":0,"responseText":"","status":0,"statusText":"error"}
[EDIT]
Some additional information: the jqXHR.state() is 'rejected'
In the error callback I added a log message for location.href:
LOG: location.href: https://us-west-2-deploy.evothings.com/hyper/..... /index.html
/[EDIT]
I have tested the web service call with SOAPUI and it always completes successfully and returns the expected json message.
From my investigation I suspect that this has something to do with a redirect - or with access-control-allow-origin.
Can anyone provide a suggestion to overcome this issue? Or to further confirm the nature of the error?
Thank you,
- David