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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -