laravel:http-client-resilience

HTTP Client Resilience

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "laravel:http-client-resilience" with this command: npx skills add jpcaparas/superpowers-laravel/jpcaparas-superpowers-laravel-laravel-http-client-resilience

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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

laravel:code-review-requests

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

laravel:iterating-on-code

No summary provided by upstream source.

Repository SourceNeeds Review
General

laravel:routes-best-practices

No summary provided by upstream source.

Repository SourceNeeds Review
General

laravel:blade-components-and-layouts

No summary provided by upstream source.

Repository SourceNeeds Review