Im trying to write an apex code for a post request while using the below data this is basically for creating a room in chat tool
curl -X PUT -H 'X-ChatWorkToken: Your API token' -d
'description=group+chat+description&icon_preset=meeting&name=Website+renewal+project'
'https://api.chatwork.com/v2/rooms/{room_id)
code until now
public class groupcreate {
public static HttpResponse makePostCallout() {
Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('https://api.chatwork.com/v2/rooms/{5678)';
request.setMethod('POST');
HttpResponse response = http.send(request);
return response;
}
}
need some guidance regarding this.