We try to send some content (can be XML / JSON or whatever) via URLConnection to an API of us.
This work perfectly on Windows but on MacOS the content is always empty if we log it in the API.
What’s the proper way to set any type of content to the URLConnection on MacOS?
Doe you issue a post, put or patch request?
Problem solved - thanks for putting me in the right direction ;-).
The colleague used a GET instead of a POST.
But curiously on Windows this doesn’t matter.
1 Like
Officially (http) it doesn’t matter but mac seems to be more data-saving and energy saving on many parts of their frameworks.
IIRC the http spec says that the server should reject any request that has body content but is not using a POST, PUT or PATCH method.