tryPost
Like post, but returns null if the request failed for any reason.
Additionally, if HttpFetcher.logOnError is set to true, any failure will be logged to the console. By default, this will be true for debug builds and false for release builds.
Parameters
The body to send with the request. Make sure your class is marked with @Serializable or provide a custom bodySerializer.
A serialize-friendly version of tryPost that has no body but expects a serialized response.
Deprecated
DO NOT IGNORE. Please change to `tryPostBytes` instead. This method will be modified soon in a backwards incompatible way, in order to support additional cases that the current form doesn't support.
Replace with
tryPostBytes(resource, body, headers, redirect, abortController, bodySerializer)A serialize-friendly version of tryPost that expects a body but does not expect a serialized response.