Skip to content

Instantly share code, notes, and snippets.

@cfjedimaster
Created July 29, 2024 15:04
Show Gist options
  • Save cfjedimaster/a9815960170e5fc97c0eeb03d88dd2e7 to your computer and use it in GitHub Desktop.
Save cfjedimaster/a9815960170e5fc97c0eeb03d88dd2e7 to your computer and use it in GitHub Desktop.
async function watermarkJob(source, watermark, token, clientId) {
let body = {
'inputDocumentAssetID': source.assetID,
'watermarkDocumentAssetID': watermark.assetID
}
let resp = await fetch(REST_API + 'operation/addwatermark', {
method: 'POST',
headers: {
'Authorization':`Bearer ${token}`,
'X-API-KEY':clientId,
'Content-Type':'application/json'
},
body:JSON.stringify(body)
});
return resp.headers.get('location');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment