http

package
v0.2026320.2238 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 10 Imported by: 2 modules, 2 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoHTTPRequest

func DoHTTPRequest(ctx context.Context, base *http.Client, req spec.CheckHTTPRequest) (spec.CheckHTTPResponse, error)

DoHTTPRequest issues req from the HOST's network namespace using a client built from base + req's per-request policy, returning the status, the body, and the formatted response-header blob. The ONE host-side HTTP-do path shared by the in-proc check context AND the CheckContextService reverse channel (R3). A transport-level failure is returned as err; a non-2xx is NOT an error (the caller matches resp.Status).

func FormatHTTPHeaders

func FormatHTTPHeaders(h http.Header) string

FormatHTTPHeaders renders an http.Header into a "Key: value\n" blob (one line per value, multi-value preserved) — the matcher-ready response-header form.

func HTTPClientFor

func HTTPClientFor(base *http.Client, req spec.CheckHTTPRequest) (*http.Client, error)

HTTPClientFor builds a per-request *http.Client honoring the CheckHTTPRequest policy (AllowInsecure, NoFollowRedirects, CAPEM, Timeout), derived from the engine's base client. The base supplies the default timeout; req.Timeout overrides it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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