Я попытался отправить запрос с заголовком авторизации, используя HttpClient от Angular, но заголовок не был успешно отправлен.
Вот мой код.
return this.http.get( API_URL + '/validate-email/' + email, this.getToken());
А вот мои хадеры:
General:
Request URL: http://10.0.2.35:3000/validate-email/
Request Method: GET
Status Code: 401 Unauthorized
Remote Address: 10.0.2.35:3000
Referrer Policy: no-referrer-when-downgrade
Request Headers:
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate
Accept-Language: es-ES,es;q=0.9,gl;q=0.8,en;q=0.7,pt;q=0.6,la;q=0.5
Connection: keep-alive
Host: 10.0.2.35:3000
Origin: http://localhost:4200
Referer: http://localhost:4200/candidate-register
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36
Response Headers:
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type,
Accept
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 49
Content-Type: application/json; charset=utf-8
Date: Mon, 21 May 2018 22:19:28 GMT
ETag: W/"31-iT0RTO+b5PSz1cX7BhK1mfQ8R6o"
X-Powered-By: Express
Кто-нибудь знает, что не так?