Skip to content

Instantly share code, notes, and snippets.

@adikuntjara
Created February 22, 2021 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adikuntjara/f7c019e73ad439686679f6bba5539a7f to your computer and use it in GitHub Desktop.
Save adikuntjara/f7c019e73ad439686679f6bba5539a7f to your computer and use it in GitHub Desktop.
get_movie_list_page.js
const supertest = require('supertest');
const env = require('dotenv').config();
const api = supertest(process.env.OMDB_BASE_URL);
const getMovieList = (key, search) => api.get('')
.set('Content-Type', 'application/json')
.set('Accept', 'application/json')
.query({
apikey: key,
s: search
})
module.exports = {
getMovieList,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment