V
V
Vadim2018-04-25 09:35:26
JavaScript
Vadim, 2018-04-25 09:35:26

Why are Headers not sent in Angular 5 on http requests?

Good afternoon, I need to make requests to a third-party API, I'm doing it on Angular 5 and I constantly get a CORS request error when sending requests to this API. And there is also a problem that the headers that I specify when sending the request are not sent, or so it seems to me that they are not sent. Actually, when sending a request, such an error occurs , in the console of my POST request there is no only OPTIONS and its details , here is the request code itself. But when sending, I always get an error, tell me what I'm doing wrong? If you enable the CORS plugin that allows requests to be sent, it works. I saw an article somewhere where they wrote that OPTIONS is sent before other requests or something like that, most likely I misunderstood something. Help razobatsya in a problem.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question