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 = {
  headers: new HttpHeaders({'Content-Type': 'application/json'})
};
  update(id, title, content) {
    const updateData = { id: id, title: title, content: content };
      return this.http.put(`http://myurl/${id}`, updateData, httpOptions);
  }
My question is:
How to I add basic authorization to my httpOptions or do I add it direct to the update method?
 
     
     
     
     
     
     
    