Skip to content

Instantly share code, notes, and snippets.

@cahyowhy
Created August 19, 2019 09:02
Show Gist options
  • Save cahyowhy/5561b79522242d0b2de52007cf3bc82b to your computer and use it in GitHub Desktop.
Save cahyowhy/5561b79522242d0b2de52007cf3bc82b to your computer and use it in GitHub Desktop.
const jsonGuru = {};
const data = new FormData();
data.append("siswa", JSON.stringify(jsonGuru));
data.append('file', file);
let config: any = {
timeout: 15000, //s
method: 'POST',
url: 'URL',
headers: {},
data: data
};
axios(config).then((response) => {console.log(response)});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment