Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dojo2 Response error #256

Open
yasikmondal opened this issue May 30, 2018 · 0 comments
Open

Dojo2 Response error #256

yasikmondal opened this issue May 30, 2018 · 0 comments

Comments

@yasikmondal
Copy link

yasikmondal commented May 30, 2018

Hi Team,

I trying to get the data from server and trying to render in UI but while making service call I am getting the below error.

Calling service API:

const json = request('http://localhost:8080/part/findall').then(response => response.json());

# Error :

Task.js:243 Uncaught (in promise) SyntaxError: Unexpected token o in JSON at position 1
    at parse (<anonymous>)
    at Task.js:243
    at handler (ExtensiblePromise.js:137)

I am getting the data from server but while assign to json getting that above error. Can you please help me where I am doing mistake.

# My response Json :

[{"id":485,"orderno":"00605164","type":"typeA","description":"description"},{"id":486,"orderno":"00605164","type":"typeB","description":"description"}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant