when a web service returns a response with an empty body, makeWebRequest returns with a -400 response code (Response body data is invalid for the request type). I have tried all available HTTP reponse content types but nothing works. This problems happens for instance when an OAUTH service sends back a 401 response code due to an expired OAUTH token. This is a common OAUTH use-case and the proper way to hande it is to present a 401 response code to the app so the app can refresh the token.
It seems makeWebRequest is to strict in how it interprets http responses and it cannot handle responses with an empty response body.