I want to pass date in angular 8 $http Get request. Please suggest me that what is the correct way to pass date.
i want to do something like this
public getCalendarData(Date): any {
let myResponse = this.http.get(`${environment.BASE_URL}/getCalendarData` + '/' + new Date().toUTCString(), {
headers: new HttpHeaders().set('SESSION-TOKEN', localStorage.getItem('jwt_token'))
});
console.log(myResponse);
return myResponse;
}
I have to integrate this API https://api/getCalendarData/20-10-2020 with angular but I don't know how to pass date in angular 8 $http Get request,