The following code put in RestClient constructor will not work (by default all member pointers have undefined values, not NULLs):
if (contentType == NULL) {
  contentType = "application/x-www-form-urlencoded";  // default
}
Working solution would be just getting rid of if clause:
contentType = "application/x-www-form-urlencoded";
Observed on WeMos whild sending POST requests.