Edge browser issue: http failure response for (url) 0 unknown error in angular

1,830 views
Skip to first unread message

Naresh Chirige

unread,
Sep 9, 2019, 3:27:00 AM9/9/19
to Angular and AngularJS discussion
Hello,

My Angular 7 project having an issue while performing HTTP POST request (FormData as body) only in Edge Browser, In other browsers like Chrome, Mozilla, Safari & IE 11 it is working as expected.

My host is localhost with HTTP protocol  and i am hitting a remote server which is having a url with HTTPS protocol


My Request Object:

this.httpClient.request(new HttpRequest('POST', url, formData, {
      responseType
: 'text',
      reportProgress
: true
});)

Expected Output:
string (success or exception)

Error Facing:
http failure response for (url) 0 unknown error 
HTTP status code 0




Sander Elias

unread,
Sep 10, 2019, 12:10:37 AM9/10/19
to Angular and AngularJS discussion
Hi Naresh,

Usually, an error-code 0 is caused by cors issues. It's strange that this only happens on Edge. I would say that one of the CORS related headers is slightly off.

Regards
Sander
Reply all
Reply to author
Forward
0 new messages