Skip to content

plugin-http

Placement compiled-in (in-process)
Source github.com/opencharly/charly/candy/plugin-http
Version 2026.176.2200
Candy plugin-http

This plugin is listed in charly/charly.yml’s compiled_plugins:, so its providers are compiled into the charly binary and register in-process.

The reserved words this plugin serves:

  • http — verb class

The http check verb relocated into a candy: an HTTP request matched against status / body / headers — issued from the charly host’s network namespace under charly check live (cc.HTTPDo), or from inside the disposable container via curl under charly check box (cc.Exec). A HOST-COUPLED verb — its RunVerb runs against the live check engine (sdk/kit.CheckContext), served in EITHER placement: compiled-in, or OUT-OF-PROCESS via the CheckContextService reverse channel (F2). A pure check verb; the matcher evaluation reuses the shared sdk.MatchAll.

The CUE schema below is the authoritative grammar for this plugin’s input. It is the same single source that generates the plugin’s Go parameter types and answers the runtime Describe RPC, so this page cannot disagree with either.

// The BUILT-IN `http` plugin's OWN CUE schema — the typed plugin_input for the `http`
// verb (host-side request under live mode, in-container `curl` under box mode). It is
// the SINGLE SOURCE for this plugin's params, used two ways (the same contract the
// reference examplerunverb and core `spec` use):
//
// 1. GENERATE the Go param struct — `cue exp gengotypes` (driven by task cue:gen,
// which wraps this with `package params` + `@go(params)`) emits
// ../params/cue_types_gen.go, so the provider decodes plugin_input into a TYPED
// struct, never a hand-parsed map.
// 2. VALIDATE authored input AT RUNTIME — the builtin serves this source over the
// Describe channel (InProcTransport) exactly like an external serves it over
// gRPC; the host splices it onto the base (base ++ plugin) and validates every
// authored `http` step's plugin_input against #HttpInput.
//
// SELF-CONTAINED: it references NO base def — the matcher shape body/header reproduces
// standalone under plugin-private def names (#HttpMatcherList / #HttpMatcher /
// #HttpMatchOp, so there is NO collision with the base #MatcherList / #Matcher /
// #MatchOpMap when base ++ plugin compiles), so it compiles standalone (gengotypes +
// the load-gate compile) AND splices onto the base.
//
// Every http request field lives here (`method`/`request_body` moved in from #Op in
// the schema-compaction cutover — per-verb fields left core #Op); `timeout` is a
// GENERAL per-step modifier (the runner's probeNeverHang floor reads it for every
// verb) and stays in #Op, read off the step Op by the runner. The provider is a
// CheckVerbProvider — it dispatches IN-PROCESS via RunVerb and so keeps the live
// *Runner (r.HTTPClient / r.Mode / r.Exec) the request needs (mirrors examplerunverb).
#HttpInput: {
// http — the request URL (the verb discriminator; also the scalar-sugar
// primary: `http: <url>`).
http: string @go(HTTP)
// method — optional HTTP request method (default GET).
method?: string
// request_body — optional request body bytes.
request_body?: string @go(RequestBody)
// status — optional expected HTTP status code (0 = unchecked).
status?: int & >=100 & <600 @go(,type=int)
// body — optional goss-style matchers the response body must satisfy. Reproduces
// the base #MatcherList shape standalone (scalar / single operator-map / list).
body?: #HttpMatcherList @go(Body)
// header — optional matchers the formatted response headers must satisfy.
header?: #HttpMatcherList @go(Headers)
// allow_insecure — skip TLS verification.
allow_insecure?: bool @go(AllowInsecure)
// no_follow_redirects — do not follow 3xx redirects (assert the first response).
no_follow_redirects?: bool @go(NoFollowRedir)
// ca_file — optional PEM CA bundle to trust for the request.
ca_file?: string @go(CAFile)
}
// #HttpMatcherList mirrors the base #MatcherList: a single matcher OR a list.
#HttpMatcherList: (#HttpMatcher | [...#HttpMatcher])
// #HttpMatcher mirrors the base #Matcher: a bare scalar (implicit match) or a
// single-operator map.
#HttpMatcher: (string | bool | number | #HttpMatchOp)
// #HttpMatchOp mirrors the base #MatchOpMap: exactly one matcher operator key.
#HttpMatchOp: {equals: _} | {not_equals: _} | {contains: _} | {not_contains: _} | {matches: _} | {not_matches: _} | {lt: _} | {le: _} | {gt: _} | {ge: _}

See also the candy reference for this candy’s install surface.