headers
headers
is an optional property that we set on every request that is made on the page. By default we do not set any headers.
api/routes/screenshot.ts
const { UrlToImage } from '@url2image/sdk'
const { data, success, message } = await UrlToImage({
url: 'URL_TO_SCREENSHOT',
token: 'YOUR_API_KEY',
options: {
headers: {
'Y-Custom-Header': 'Y-Custom-Value',
'X-Custom-Header': 'X-Custom-Value',
}
}
})