Skip to content
Agentmart
Submit a tool

angular-http

ALWAYS use when working with Angular HttpClient, HTTP requests, interceptors, error handling, or API communication in Angular applications.

Skill by oguzhan18

IndexedMIT★ 7
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/oguzhan18-angular-http

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

ALWAYS use when working with Angular HttpClient, HTTP requests, interceptors, error handling, or API communication in Angular applications.

Use cases: frontend, backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/angular-http

What's inside

Skill name
angular-http
Description
ALWAYS use when working with Angular HttpClient, HTTP requests, interceptors, error handling, or API communication in Angular applications.
License
MIT
Metadata
version: 21.0.0 · generated_at: 2026-02-19 · generated_by: oguzhancart
Instructions
138 lines in SKILL.md · view on GitHub

Files (5)

  • SKILL.md
  • _INDEX.md · references/discussions/
  • _INDEX.md · references/docs/
  • _INDEX.md · references/issues/
  • _INDEX.md · references/releases/

SKILL.md (first lines)

# @angular/common/http

**Version:** Angular 21 (2025)
**Tags:** HTTP, REST, API, Interceptors

**References:** [HttpClient](https://angular.dev/guide/http) • [API](https://angular.io/api/common/http) • [Interceptors](https://angular.dev/guide/http/interceptors)

## API Changes

This section documents recent version-specific API changes.

- NEW: Functional interceptors — Use `provideHttpClient(withInterceptors([...]))` for modern interceptor setup [source](https://dev.to/cristiansifuentes/angular-20-httpclient-interceptors-functional-predictable-and-powerful-kdf)

- NEW: `withFetch` — Use native fetch API with HttpClient [source](https://angular.dev/guide/http)

- NEW: `withInterceptorsFromDi` — Legacy interceptor support with functional approach

- NEW: HttpContext tokens — Per-request metadata using HttpContextToken

- NEW: `AbortSignal` support — Request cancellation with timeout support

- DEPRECATED: Class-based HttpInterceptor — Migrate to functional interceptors

## Best Practices

- Use functional interceptors

```ts
// ✅ Modern functional interceptor
export const authInterceptor: HttpInterceptorFn = (req, next) => {
  const authService = inject(AuthService);
  const token = authService.getToken();
  
  if (token) {
    const authReq = req.clone({
      setHeaders: { Authorization: `Bearer ${token}` }
    });
    return next(authReq);
  }
  return next(req);
};

// Register
export const appConfig: ApplicationConfig = {
  providers: [
    provideHttpClient(withInterceptors([authInterceptor]))
  ]
};
```

- Use interceptors for cross-cutting concerns — Authentication, logging, error handling

```ts
// Error interceptor with retry
export const errorInterceptor: HttpInterceptorFn = (req, next) => {
  return next(req).pipe(
    catchError((error: HttpErrorResponse) => {
      if (error.status === 401) {
        inject(Router).navigate(['/login']);
      }
      return throwError(() => error);
    })
  );
};
```

- Use retry with backoff for flaky networks

```ts
import { retry, delay, catchError } from 'rxjs/operators';

http.get('/api/data').pipe(
  retry({ count: 3, delay: 1000 })
);
```

- Use HttpContext for per-request flags

```ts
const cacheToken = new HttpContextToken<boolean>(() => false);

export const cacheInterceptor: HttpInterceptorFn = (req, next) => {
  if (req.context.get(cacheToken)) {
    // Check cache
  }
  return next(req);
};

// Usage
http.get('/api/data', {
  context: new HttpContext().set(cacheToken, true)
});
```

- Use proper typing for HTTP responses

```ts
interface User {
  id: number;
  name: string;
}

http.get<User>('/api/user/1').subscribe(user => {
  console.log(user.name); // TypeScript knows the type
});
```

- Use `observe: 'response'` for full HTTP response

```ts
http.get('/api/data', { observe: 'response' }).subscribe(response => {
  console.log(response.headers);
  console.log(response.body);
});
```

- Handle errors globally

```ts

From oguzhan18/angular-ecosystem-skills, MIT.

More from oguzhan18/angular-ecosystem-skills

Signals

Stars
7
Forks
1
Open issues
0
Last commit (this folder)
Feb 18, 2026 (8 months ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
21.0.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from oguzhan18

Cite this page

angular-http skill. Agent Mart. https://agentmart.dev/skills/oguzhan18-angular-http (last updated 2026-10-24)