Created
September 1, 2015 00:18
-
-
Save boomtrain-support/c5c74dfb68dbd58930e3 to your computer and use it in GitHub Desktop.
DELETE /resources/:model/:id - Delete an existing Resource with the specified model type by ID using jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Delete a resource for the model by ID | |
function deleteResourcesModelId() { | |
// Send a jQuery AJAX request to delete the resource | |
$.ajax({ | |
url: 'https://api.boomtrain.com/resources/{model}/{id}', | |
// Replace with your Username, Password, and App Id | |
headers: { | |
'x-app-id': '{app_id}', | |
'Content-Type': 'application/json', | |
'Authorization': 'Basic ' + btoa('{username}:{password}') | |
}, | |
type: 'DELETE', | |
success: function(msg) { | |
console.log(msg); | |
} | |
}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment