Skip to content
Back to skills

Http Client Resilience

ASecurity

Use the HTTP client with sensible timeouts, retries, and backoff; capture context and handle failures explicitly

  • 147 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added June 6, 2026
toolsapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned June 6, 2026

npx -y skills add jpcaparas/superpowers-laravel --skill http-client-resilience --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Http Client Resilience?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Http Client Resilience
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jpcaparas-http-client-resilience/badge)](https://www.skillsdirectory.com/skills/jpcaparas-http-client-resilience)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: laravel:http-client-resilience
description: Use the HTTP client with sensible timeouts, retries, and backoff; capture context and handle failures explicitly
---

# HTTP Client Resilience

Design outbound calls to be predictable and observable.

## Commands

```
use Illuminate\Support\Facades\Http;

$res = Http::baseUrl(config('services.foo.url'))
    ->timeout(5)
    ->retry(3, 200, throw: false)
    ->withHeaders(['Accept' => 'application/json'])
    ->get('/v1/things', ['q' => 'bar']);

if (!$res->successful()) {
    Log::warning('foo api failure', [
        'status' => $res->status(),
        'body' => substr($res->body(), 0, 500),
    ]);
}
```

## Patterns

- Set timeouts explicitly (client and server defaults differ)
- Use limited retries with backoff for transient failures only
- Prefer dependency injection for testability
- Add request/response context to logs (redact sensitive data)
- Use `pool()` for concurrency when calling multiple endpoints

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.