What problem does it solve?
This Skill simplifies making HTTP requests in Go by wrapping the standard net/http library with functional programming principles, enabling composable, context-aware operations with automatic error propagation.
Core Features & Use Cases
- Functional HTTP Client: Uses
ReaderIOResult monad for lazy, composable HTTP requests.
- Request Building: Provides functions to easily create GET, POST, and other requests with options for headers, query parameters, and JSON bodies.
- Response Handling: Offers readers for JSON, text, and raw bytes, with automatic validation.
- Parallel Requests: Supports executing multiple requests in parallel, handling both homogeneous and heterogeneous response types.
- Builder API: A fluent API for constructing complex requests.
- Use Case: Fetching data from multiple external APIs concurrently, processing the responses, and handling potential errors gracefully within a larger Go application.
Quick Start
Use the fp-go HTTP skill to make a GET request to "https://api.example.com/users/1" and parse the JSON response into a User struct.