Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consulta Tp3 Punto 2 #64

Open
tomasechague opened this issue May 20, 2019 · 2 comments
Open

Consulta Tp3 Punto 2 #64

tomasechague opened this issue May 20, 2019 · 2 comments

Comments

@tomasechague
Copy link

Buenas!. Estamos realizando el punto 2 del punto 3. Ya hicimos que se cree la pelicula mediante la API, pero no estamos pudiendo encontrar la forma de realizar el GET de la pelicula .

Saludos!.

@RodrigoJacznik
Copy link
Contributor

Hola,

con esto obtenes todas las películas (un array)

const allMovies = await fetch('${baseURL}/movies')
        .then(result => result.json())

con esto obtenes la película con id "id"

// Reemplazar ${id} con el id de la pelicula que queres obtener
const allMovies = await fetch('${baseURL}/movies/${id}')
        .then(result => result.json())

Saludos

@tomasechague
Copy link
Author

Joya, gracias. Ahora nos fijamos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants