I am importing got dynamically, like this:
const { default: moduleGot } = await import('got');
moduleGot();
Then, I want to execute a function from it:
const response = await got(url, {
method: 'POST',
headers: {
"Content-Type": `multipart/form-data; boundary=${data._boundary}`,
"Authorization": `Bearer ${config.pinata.jwt}`
},
body: data
})
But I am getting ReferenceError: got is not defined
What is the right way of importing it and then use got?