Created
February 22, 2021 13:13
-
-
Save adikuntjara/f7c019e73ad439686679f6bba5539a7f to your computer and use it in GitHub Desktop.
get_movie_list_page.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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