@ng-desktop/http
v0.9.0
Published
Native Angular HttpBackend bridging HttpClient, interceptors, and httpResource() to the Rust host
Maintainers
Readme
@ng-desktop/http
OS-native HTTP/2 backend (NativeHttpBackend) and reactive createNativeHttpResource() implementing @angular/common/http (provideHttpClient, interceptors, caching, parallel batching, and XSRF configuration) over Rust native transport (libsoup-3.0 on Linux).
Install
pnpm add @ng-desktop/http @ng-desktop/platformPeer dependencies: @angular/core >= 22.0.0, @angular/common >= 22.0.0, @ng-desktop/platform.
Quick Usage
import { ApplicationConfig } from '@angular/core';
import { provideHttpClient, withFetch, withXsrfConfiguration } from '@ng-desktop/http';
export const appConfig: ApplicationConfig = {
providers: [
provideHttpClient(
withFetch(),
withXsrfConfiguration({
cookieName: 'XSRF-TOKEN',
headerName: 'X-XSRF-TOKEN',
}),
),
],
};Key Exports
provideHttpClient,provideNativeHttpClient,NativeHttpBackendwithFetch,withInterceptors,withInterceptorsFromDi,withHttpCaching,withParallelBatching,withXsrfConfiguration,withNoXsrfProtection,withNativeHttpConfigcreateNativeHttpResource,NATIVE_HTTP_CONFIG,resolveNativeHttpConfig
