below postman call works
below httpClient call fails on Angular.
type or paste code here
*******************auth-config.module.ts*******************************************
```import { NgModule } from '@angular/core';
import { AuthModule, LogLevel } from 'angular-auth-oidc-client';
@NgModule({
imports: [AuthModule.forRoot({
config: {
authority: 'https://dev-xx5jaeo2xxxxxsvi.us.auth0.com',
redirectUrl: window.location.origin,
clientId: 'VKsDsuugMR0FGC0O2b0CiwSuZAxxxxxx',
scope: 'openid profile offline_access',
responseType: 'code',
silentRenew: true,
useRefreshToken: true,
logLevel: LogLevel.Debug,
secureRoutes:['http//localhost:8080'], //securing the backend
customParamsAuthRequest:{
audience: 'http://localhost:8080/'
}
}
})],
exports: [AuthModule],
})
export class AuthConfigModule {}
*******************save-video-details.component.ts*******************************************
saveVideo(){
//Call the video service to make a http call to our backend
console.log("inside saveVideo:")
const videoMetaData: VideoDto = {
"id": this.videoId,
"title": this.saveVideoDetailsForm.get('title')?.value ,
"description": this.saveVideoDetailsForm.get('description')?.value,
"tags": this.tags,
"videoUrl": this.videoUrl,
"videoStatus": this.saveVideoDetailsForm.get('videoStatus')?.value,
"thumbnailUrl": this.thumbnailUrl
}
console.log(videoMetaData);
this.videoService.saveVideo(videoMetaData).subscribe(data=>{
this.Matsnackbar.open("Video metaData Updated successfully","OK");
});
}