dojo / dojo/meta

Dojo2 Response error

Open
#256 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
226
Forks
42
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.