I have a service in Angular 6 and I\'m trying to change a record but it\'s saying I\'m not authorized.
Right now I have this:
const httpOptions = {
import { HttpClient, HttpHeaders } from '@angular/common/http'; var headers = new HttpHeaders(); var token = localStorage.getItem('token'); headers.append('Content-Type', 'application/json'); headers.append("Authorization", "Basic " + token)); const httpOptions = { headers: headers };