#How to define the proper request to OMDb API
18 messages · Page 1 of 1 (latest)
https://www.omdbapi.com/ check out the page, it provides usage info and even an example to play with.
Hi @mystic parcel ,thanks for the response. I am using the info there "Usage"
but I am still getting fetch error
I am trying to console.log it first but maybe I am missing something with fetch
Try the example and adjust your fetch url accordingly.
thanks man
I can now fetch data with this
var requestOptions = {
method: 'GET'
};
fetch("https://www.omdbapi.com/?apikey=<mykey>", requestOptions)
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.log('error', error));
if you need more help understanding a url strucutre, check this out https://www.botify.com/learn/basics/what-are-url-parameters
thank you!
good but this can be more simplified as you will have to use url paramters as your app will search for the film using a user inputted search term.