mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 14:37:21 +01:00
no need for pdf-js
This commit is contained in:
15
webapp/apiHelper.js
Normal file
15
webapp/apiHelper.js
Normal file
@@ -0,0 +1,15 @@
|
||||
export function generatePdf(state){
|
||||
return fetch('//localhost:5000/pdf/generate/brief', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(state)
|
||||
}).then(function(res) {
|
||||
if (res.status !== 200) {
|
||||
console.log('request failed');
|
||||
return;
|
||||
}
|
||||
return res.json();
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user