Hey.
I´m building a custom CMS to our discourse platform.
I’m having some trouble when trying to post something.
I’m building it in angular and the programing language is typescript.
Here is a picture of my function
createACompetition(CompetitionName: string, groupName) {
const headers = new HttpHeaders().set('Content-Type', 'multipart/form-data');
const data = new FormData();
data.append('api_key', WLIApiKey);
data.append('api_username', WLIUsername);
data.append('color', '49d9e9');
data.append('text_color', 'f0fcfd');
data.append('name', CompetitionName);
console.log(data.get('name'));
// Security group on create
// data.append('permissions[]' + groupName, '1');
return this.http.post(url + '/categories', data, {
headers
});
}
and this is my error message
Did I make a mistake in my post request ?