code: function sendHealthDataToServer() {
          var result = new $.Deferred();
  
          getHealthData().done(function (healthData) {
  
              var url = brackets.config.healthDataServerURL,
                  data = JSON.stringify(healthData);
  
              $.ajax({
                  url: url,
                  type: "POST",
                  data: data,
                  dataType: "text",
                  contentType: "text/plain"
              })
                  .done(function () {
                      result.resolve();
                  })
                  .fail(function (jqXHR, status, errorThrown) {
                      console.error("Error in sending Health Data. Response : " + jqXHR.responseText + ". Status : " + status + ". Error : " + errorThrown);
                      result.reject();
                  });
          })
              .fail(function () {
                  result.reject();
              });
  
          return result.promise();
      }
docs: Send data to the server