javascript - Request works from browser and not from react native -


i making request within react-native app using axios.

const url = `https://maps.googleapis.com/maps/api/geocode/json?address=${address}&key=${google_api_key}`; 

i console log url right after , this:

(note: api key made example, see original one)

console.log(url) // https://maps.googleapis.com/maps/api/geocode/json?address=carrer de ali beii+130,+barcelona,+espaƱa&key=rwzasyaibdsd23hrjwwxl873kb5ej2zjwe3wet66b_cgs0 

however, catch promise returned axios , get:

error: request failed status code 404 

furthermore, if copy paste console logged url above ^ browser, json data. going on here?

one more thing: if copy paste browser transformed url:

https://maps.googleapis.com/maps/api/geocode/json?address=carrer%20de%20ali%20beii+130,+barcelona,+espa%c3%b1a&key=rwzasyaibdsd23hrjwwxl873kb5ej2zjwe3wet66b_cgs0 

into app , make request, data. axios indeed working. leaves me conclusion google not transforming request browser-like url???


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -