问题
I am new to SSl/TLS protocols.I have back-end(API) wich is TLSv1.2 enabled. What I want to do is set the tls version for each and every request of my front-end(Angular) application.I want to prove that my application capable of sending TLSv1.2 request.Is there any way to set TLS version in angular web api request.Then i can change the TLS version and prove that.
This is how consume web API.
public methodName(): Observable<any[]> {
return this.http
.get<any>(`${config.apiUrl}url`)
.pipe(
map(data =>
data.map(m => {
return m;
})
),
catchError(error => {
this.notificationServiceService.OpenErrorSnackBar(error.message);
return of(any[0]);
})
);
And i have TokenIntercepter to add token for each request. This is how i did it.
request.clone({
setHeaders: {
Authorization: `Bearer ${token}`,
}
});
Any suggestions are welcome to fix this issue.
来源:https://stackoverflow.com/questions/60863817/explicitly-set-tlsv1-2-in-httpclient-request-in-angular