blob: b72ada70b8fd48fc130f19bc6379f4a0e5d00a72 (
plain) (
blame)
1
2
3
4
5
|
export function createCurlCommand(subCommand, data) {
let full = window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : '');
return `curl --request PUT \\\n --url ${full}/api${subCommand} \\\n ` +
`--header 'content-type: application/json' \\\n --data '${JSON.stringify(data)}'`;
}
|