httpclient

command
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package main demonstrates the HTTP client components:

  • transport/http/client.NewJSONClient — zero-boilerplate typed client
  • transport/http/client.NewClient — full-control client
  • ClientBefore / ClientAfter hooks
  • ClientFinalizer
  • Round-trip test: NewJSONServer (server) + NewJSONClient (client)

The example starts an in-process httptest server so no external service is needed.

Run:

go run ./examples/httpclient

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL