1
Follows code:
var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Add("Accept", "application/json");
httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
var result = await httpClient.DeleteAsync(new Uri("URL do Site ..."));
See the return:
HTTP Status 415 - Unsupported Media Type Type Status Report
Message Cannot consume content type
Description The origin server is refusing to service the request because the payload is in a format not supported by this method on the target Resource.
Apache Tomcat/8.5.23
Placed "Accept", "application/json" and yet it didn’t work. I seem to be missing put application/json in the DeleteAsync().
Some solution ?