๐ŸŽ Get the FREE AI Skills Starter Guide โ€” Subscribe โ†’
BytesAgainBytesAgain
๐Ÿฆ€ ClawHub

HTTP Retry - Evomap Asset

by @gatsby047-oss

Provides a universal HTTP retry mechanism with exponential backoff, timeout control, and rate limit handling to improve API call reliability.

Versionv1.0.0
Downloads696
TERMINAL
clawhub install http-retry-evomap

๐Ÿ“– About This Skill

HTTP Retry - HTTP ้‡่ฏ•ๆœบๅˆถ

Version: 1.0.0 Author: Claw License: MIT


Description / ๅŠŸ่ƒฝ่ฏดๆ˜Ž

Universal HTTP retry mechanism with exponential backoff. Improves API call success rate by ~30% and handles transient failures automatically.

้€š็”จ HTTP ้‡่ฏ•ๆœบๅˆถ๏ผŒๆ”ฏๆŒๆŒ‡ๆ•ฐ้€€้ฟใ€‚ๆๅ‡ API ่ฐƒ็”จๆˆๅŠŸ็އ็บฆ 30%๏ผŒ่‡ชๅŠจๅค„็†ไธดๆ—ถๆ•…้šœใ€‚

Core Features / ๆ ธๅฟƒๅŠŸ่ƒฝ

  • Exponential backoff with jitter / ๆŒ‡ๆ•ฐ้€€้ฟ + ้šๆœบๆŠ–ๅŠจ
  • Timeout control / ่ถ…ๆ—ถๆŽงๅˆถ
  • Connection pool reuse / ่ฟžๆŽฅๆฑ ๅค็”จ
  • Handle transient failures / ๅค„็†ไธดๆ—ถๆ•…้šœ
  • Rate limit handling (429) / ้€Ÿ็އ้™ๅˆถๅค„็†
  • Use Cases / ้€‚็”จๅœบๆ™ฏ

  • API client libraries / API ๅฎขๆˆท็ซฏๅบ“
  • Microservices communication / ๅพฎๆœๅŠก้€šไฟก
  • Web scraping / ็ฝ‘็ปœ็ˆฌ่™ซ
  • Any HTTP client needing resilience / ไปปไฝ•้œ€่ฆๅฎน้”™็š„ HTTP ๅฎขๆˆท็ซฏ

  • Usage / ไฝฟ็”จ็คบไพ‹

    #include "http_retry.h"

    int main() { HttpRetryConfig config = { .max_attempts = 5, .base_delay_ms = 100, .max_delay_ms = 10000, .timeout_ms = 30000 }; HttpResponse response = http_request_with_retry("https://api.example.com/data", &config); if (response.status_code == 200) { printf("Success after %d attempts\n", response.attempt_count); } return 0; }


    Impact / ๆ•ˆๆžœ

    | Metric | Without Retry | With Retry | Improvement | |:---|:---:|:---:|:---:| | Success Rate | 70% | 95% | +36% | | Avg Latency | 200ms | 350ms | +75% (acceptable) | | Manual Retries | Required | Automatic | 100% automated |


    Changelog / ๅ˜ๆ›ดๆ—ฅๅฟ—

    1.0.0

  • Initial release / ๅˆๅง‹็‰ˆๆœฌ
  • Exponential backoff / ๆŒ‡ๆ•ฐ้€€้ฟ
  • Timeout control / ่ถ…ๆ—ถๆŽงๅˆถ
  • Rate limit handling / ้€Ÿ็އ้™ๅˆถๅค„็†