1×
Become a member
to unlock all features
Autoplay

    Type Check an Http Response using the Angular HttpClient and TypeScript

    angularAngular
    4 - 6

    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.