http

package
v0.2026262.1230 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 10 Imported by: 0

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