I'm passing the id of a user to delete a record to the other server.
HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
Http http = new Http();
req.setEndpoint('testsite.com/api/User');
req.setMethod('DELETE');
req.setBody('29');
req.setHeader('Content-Type', 'application/json');
try {
res = http.send(req);
}
catch(System.CalloutException e) {
System.debug('Callout error:' + e);
}
System.debug(res.getBody());