http

package
v1.0.1-0...-e82b9d2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package http defines public outbound HTTP capabilities without runtime or concrete transport dependencies. Clients are borrowed from injected providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Do(request *http.Request) (*http.Response, error)
}

Client executes explicit HTTP requests. Request contexts control cancellation. The caller closes each response body; the provider owner manages connections.

type Options

type Options struct {
	URL    string            `json:"url"`
	Method string            `json:"method"`
	Header map[string]string `json:"header,omitempty"`
	client.Limits
}

Options describes an explicit HTTP destination and its defaults. Dynamic credentials belong on the request, not in deployment constants.

type Provider

type Provider interface {
	Client(ctx context.Context, options Options) (Client, error)
}

Provider resolves or reuses a client from deployment-owned typed options. Runtime composition injects implementations. Callers do not own the provider or client and must not close their connection pools.

Jump to

Keyboard shortcuts

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