What problem does it solve?
Writing HTTP clients in Go with fp-go requires understanding the ReaderIOResult monad, lazy execution, and error propagation through the Result type, which is unfamiliar to most Go developers. This Skill provides the patterns and APIs needed to construct, execute, and compose HTTP requests idiomatically within the fp-go v2 ecosystem.
Core Features & Use Cases
- Request Construction: Create GET requests with MakeGetRequest, arbitrary requests with MakeRequest, or complex requests via the builder API (WithURL, WithJSON, WithBearer, WithHeader, WithQueryArg).
- Typed Response Parsing: Use ReadJSON, ReadText, ReadAll, or ReadFullResponse to validate status codes and Content-Type before decoding response bodies into typed structs.
- Parallel Requests: Run homogeneous requests concurrently with TraverseArray or heterogeneous requests with TraverseTuple2, keeping full type safety.
- Use Case: Fetch a list of posts and an unrelated cat fact from two different APIs in parallel, decode each into its own Go struct, and propagate any error automatically to a single handling point in an HTTP handler.
Quick Start
Ask the AI to write Go code using fp-go that fetches JSON from an API endpoint with the ReaderIOResult HTTP client and decodes it into a typed struct.