#How to define the proper request to OMDb API

18 messages · Page 1 of 1 (latest)

fleet oasis
#

hello, I am a newbie here and just going to start working on the movie api but I couldn't define the proper request format to fetch data. How someone can help. Thanks!

mystic parcel
fleet oasis
#

but I am still getting fetch error

#

I am trying to console.log it first but maybe I am missing something with fetch

mystic parcel
fleet oasis
#

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));

mystic parcel
mystic parcel
fleet oasis
#

yes sir thanks! for now I am trying to make it work and log any content

#

my next step would be trying the input search term for testing

#

now I can see the problem earlier

#

there is no s in http on the site