Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Dojo2 Response error #256

@yasikmondal

Description

@yasikmondal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions