cordova-plugin-wkwebview-engine
cordova-plugin-wkwebview-engine copied to clipboard
Http failure response for (unknown url): 0 Unknown Error
Hi,
I'm trying to make an http post request with the @angular/[email protected] client.
The server is configured like this:
Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE
The specific resource that I'm trying to access doesn't support POST though, so it errors with 405 Method Not Allowed.
Instead of receiving a HttpErrorResponse with a status of 405, I'm getting this:
{
"headers": {
"normalizedNames": {},
"lazyUpdate": null,
"headers": {}
},
"status": 0,
"statusText": "Unknown Error",
"url": null,
"ok": false,
"name": "HttpErrorResponse",
"message": "Http failure response for (unknown url): 0 Unknown Error",
"error": {
"isTrusted": true
}
}
This only happens on iOS with WKWebView enabled.
Is this expected behaviour? Shouldn't the status at least be 405? Why is url null?
Have you found any solution ? I am facing same issue more than 3 days spending to resolve it