← All recipes
Moderne licensed

Remove withFetch() from provideHttpClient()

Recipe IDorg.openrewrite.angular.migration.remove-with-fetchArtifact@openrewrite/recipes-angular

Removes the withFetch() feature from provideHttpClient() calls. Angular 22 uses the Fetch API by default and deprecated withFetch(), which can be safely removed.

Single recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.angular.migration.remove-with-fetch

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-angular