TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bilal K.
NA
3
1.2k
Question about Angular Typescript API with Swagger Codegen
Jan 31 2020 9:29 AM
Hello!
In our app, we use Swagger Codegen to generate Typescript Angular API, and we use it the same way as described in this article: https://www.c-sharpcorner.com/blogs/generate-angulartypescript-api-client-with-swagger-codegen by Naveen.
I have a question regarding setting header.
This is how we're doing it:
this.fooService.defaultHeaders = new HttpHeaders({
HeaderName: this.headerValue
});
this.
fooService.getBar(...[values]).subscribe(...)
My question is whether there is a way to set headers different, where the first part doesn't have to be repeated everytime we call the service.
Our hope was there maybe there exists a way to say:
this
.fooService.getBar(...[values], ...[Options]).subscribe(...)
The issue is that out backend specifically requests that the value needed comes as a headers.
Thank you for your help!
Reply
Answers (
1
)
open pdf file from angular with local path
Question about Angular 6 chart Mdbootstrap