Skip to main content
The Angular client integrates seamlessly with Angular’s HttpClient and dependency injection system, providing type-safe API calls with full Angular ecosystem support.

Installation

Setup

1

Create a client instance

2

Provide the client in your Angular module

3

Use in your components or services

Configuration

The Angular client extends Angular HttpClient configuration:

Client Options

Dependency Injection

Inject HttpClient automatically:

Custom Injector

Provide a custom injector for contexts outside the injection context:

HTTP Methods

Response Styles

Fields Style (Default)

Data Style

Authentication

Bearer Token

Basic Authentication

Per-Request Security

Interceptors

Add request, response, and error interceptors:

Request Interceptor

Response Interceptor

Error Interceptor

Server-Sent Events

Stream real-time data:

Working with HttpRequest

Generate HttpRequest objects for manual handling:

Integration with Services

Create type-safe API services:

Error Handling

With Error Field

With Exceptions

TypeScript Types

Advanced Examples

Global Error Handler

Response Validation with Zod

Next Steps

Fetch Client

Lightweight alternative for Angular

Authentication

Set up API authentication

Interceptors

Add request/response interceptors

Error Handling

Handle errors effectively