Skip to content

Instantly share code, notes, and snippets.

@cfjedimaster
Created August 28, 2024 17:17
Show Gist options
  • Save cfjedimaster/18437345ab90f98005b07d673249ae06 to your computer and use it in GitHub Desktop.
Save cfjedimaster/18437345ab90f98005b07d673249ae06 to your computer and use it in GitHub Desktop.
async function setFormDataJob(source, data, token, clientId) {
let body = {
'assetID': source.assetID,
'jsonFormFieldsData':data
}
let resp = await fetch('https://pdf-services-ue1.adobe.io/operation/setformdata', {
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