Type Check an Http Response using the Angular HttpClient and TypeScript

Share this video with your friends

Send Tweet

When we invoke our backend API, we retrieve some well defined data object, such as a Person. By using TypeScript we can define the Type of such a data object and also provide this type to the Angular HttpClient. As a consequence, our Http request gets “typed” and we get an instance of a Person type.