I have a problem with the API request that are type put or post without body, the problem is that is not recognizing the authorization header, this only happens with the request that doesn't have the body, the other post and put with a body on it works fine
I would like to know why this happens
This is my API call without the body, this is the one that experience the problem
removeToken(idUsuario:number,token:any){
this.httpOptions2 = {
headers: new HttpHeaders({
'authorization': token,
})
}
return this.http.put(this.API_URL+'api/auth/logout/'+idUsuario,this.httpOptions2)
}
This one works totally fine https://www.screencast.com/t/OfyOvxXn
finishStudy(idStudio:number,resultado:string,token:any){
this.httpOptions2 = {
headers: new HttpHeaders({
'authorization': token,
})
}
return this.http.put(this.API_URL+'api/analista/finalizar/'+idStudio,{"resultado":resultado},this.httpOptions2)
}