Chrome Extension

$.ajax jQuery

    url: 'YourRestEndPoint',
    method: 'POST',
    headers: {
        'Authorization':'Token xxxxxxxxxxxxx',
    data: { "key": "value" },
    dataType: 'application/json',
    processData: false, //IF YOU ARE SENDING FORM DATA
    contentType: false,
    success: function(data){
      console.log('success: ', data);
    error: function(data) {
        console.log('error: ', data);
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool

Above is the code snippet to send ajax request using jQuery. 

Was this helpful?
Join Devsheet Ask a Question