go-http-advanced

Configure Go HTTP clients with transport reuse, timeouts, and retry strategies.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/vincent119/ai-rules-kit --skill go-http-advanced
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-http-advanced
Source: https://github.com/vincent119/ai-rules-kit/tree/main/skills/go-http-advanced
Command: npx skills add https://github.com/vincent119/ai-rules-kit --skill go-http-advanced

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go projects often reinvent HTTP client boilerplate, leading to flaky error handling and inconsistent timeouts. This Skill provides a standardized reference for reusable transports, retry strategies with exponential backoff, safe body replay, and well-managed timeouts to ensure reliable HTTP communication.

Core Features & Use Cases

  • Reusable http.Transport and http.Client configurations to maximize connection reuse and minimize resource usage.
  • Deterministic retry strategy with controlled backoff for idempotent requests, including body replay to safely retry.
  • Timeout orchestration across transport, client, and request context to guarantee timely responses and cancellation.

Quick Start

Configure a Go HTTP client using the recommended transport and retry patterns to call an internal API endpoint.

Frequently Asked Questions about go-http-advanced

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a robust Go HTTP client with proper timeout configuration?

Build a robust Go HTTP client by orchestrating timeouts across transport, client, and request context to guarantee timely responses and safe cancellation. This standardized approach prevents resource exhaustion and flaky microservice calls.

What is the best way to implement retry with exponential backoff in a Go HTTP client?

Implement retry with exponential backoff in a Go HTTP client by applying deterministic retry strategies for idempotent requests. This includes safe body replay and proper request cloning to ensure reliable external API integrations without data corruption.

How do I safely replay an HTTP request body when retrying failed calls in Go?

Safely replay an HTTP request body in Go by properly cloning the request and buffering the body payload. This ensures that failed retry attempts can resend the original data securely without panicking or exhausting the stream.

Why should I reuse http.Transport in Go microservice calls?

Reuse http.Transport in Go microservice calls to maximize connection pooling and minimize resource usage. Standardized transport configuration prevents connection leaks and ensures high-performance HTTP communication across internal services.

How do I integrate middleware with a Go HTTP client for external API integrations?

Integrate middleware with a Go HTTP client for external API integrations by following comprehensive guidelines for redirects and middleware integration. This ensures deterministic client construction and safe error handling across diverse external endpoints.