mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 06:27:19 +01:00
16 lines
405 B
JavaScript
16 lines
405 B
JavaScript
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.error('request failed');
|
|
return;
|
|
}
|
|
return res.json();
|
|
});
|
|
}
|