breeze-client / httpClientFetch
Function: httpClientFetch()
httpClientFetch(
http):BreezeFetch
Defined in: src/angular/adapter-angular-httpclient.ts:39
A BreezeFetch that sends Breeze's requests through Angular's HttpClient, so that they pass through your interceptors and, in tests, HttpTestingController.
ts
// app.config.ts
import { httpClientFetch } from 'breeze-client/adapter-angular-httpclient';
provideAppInitializer(() => { configureBreeze({ fetch: httpClientFetch(inject(HttpClient)) }); }),HttpClient throws on a status outside 200-299 rather than returning the response. This hands Breeze that response anyway - its status, body and headers - because that is how Breeze turns a rejected save into entityErrors and a 409 into a concurrency conflict. A request that never completed (status 0) is left to fail, and Breeze reports it as a transport failure.
Parameters
http
HttpClient
the application's HttpClient