How To Request Data From an Api GET

Any example how to connect to an api sending GET vars and show the data on the UX?

The api (made with json) requests are formated like this “movie.apib/discover/movie?sort_by=popularity.desc” and it need an api key that you have to send using an http parameter like this “https://api.themoviedb.org/3/movie/550?api_key=##

that request will respond with a list of the movies sorted by popularity.

i need to get that response and list all the movies (or at least 20 of them).

Thanks

Hi!

Here are some examples that uses fetch to GET data from a REST API:

Hello to you people does someone has any idear how the registration code look like? i want to send a username and password to a xampp phpMyAdmin Mysql locale server but it’s not working. code1 functions_php_ index_php

I think because you set your URL to localhost, you need to set the URL pointing to your computer with an IP address

Hi @Hassan_M i have tried but nothing is happening

Test if the urls work via a browser or rest client, let us know the results.

Hi @Hassan_M and @aeq thank you very much, it worked with the my computer IP address. To have the IP address just type, ipconfig in the cmd if you use windows. i did not answer since because i’m doing the registration with Wordpress.

1 Like