dojo / meta

:rocket: Dojo - meta information for the project.
Other
227 stars 50 forks source link

Dojo2 Response error #256

Open yasikmondal opened 6 years ago

yasikmondal commented 6 years ago

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"}]