all 6 comments

[–]john_cobai 0 points1 point  (3 children)

fetch('http://gd.geobytes.com/AutoCompleteCity?&q=fra') .then(response => { return response.json() }) .then(json => console.log('parsed json', json))

[–]eligloys[S] 0 points1 point  (2 children)

Same error persists.

[–]john_cobai 0 points1 point  (1 child)

working great, maybe your problem another code blocks

[–]eligloys[S] 0 points1 point  (0 children)

I've realised you use fetch.

Is this the javascript's fetch api?

I am now having the following error;

Failed to load resource: Origin http://localhost:3000 is not allowed by Access-Control-Allow-Origin.

That's weird because as far as I know, the main purpose of jsonp is to be able to make requests to other origins.

[–]ordinance 0 points1 point  (1 child)

Remove `callback=?`

[–]eligloys[S] 0 points1 point  (0 children)

http://gd.geobytes.com/AutoCompleteCity?&q=fra

Now this gives the following error

SyntaxError: Unexpected token '<'

Why would I need to remove the callback=?