Hi,
Call to Delete contact_lists returns
status code 415
response
[
{
"error_key": "contacts.api.error",
"error_message": "The provided content-type 'text\/plain' is not supported."
}]
Why is content type needed as the call is not providing any request content.
Snippet of API client ASP.Net Core 3.1
httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
httpClient.DefaultRequestHeaders.Add("Accept", "application/json");
var response = await httpClient.DeleteAsync($"{baseUrl}{apiVersion}/contact_lists/{contactListId}");
var content = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode)
{
var jObject = JObject.Parse(content);
return mapper.Map<DeleteContactListDto>(jObject);
}
else
logger.Warning(content);
Thanks
Solved! Go to Solution.
Changed how the request is sent and added empty content
Changed how the request is sent and added empty content
Announcements
Join our list to be notified of new features and updates to our V3 API.
Sign Up