Skip to content

HTTP / REST

httprest is the generic REST client. One instance wraps a single API base URL and auth header; operations cover the five standard HTTP verbs (GET, POST, PUT, PATCH, DELETE).

Reach for it when an LLM needs to call a JSON API you have not wrapped in a typed connector yet. The flip side: input/output are untyped string blobs, so the LLM has to know the API's shape from the prompt or its own knowledge. For anything you call repeatedly, write a typed connector instead — see Connector Module.

Sourceinternal/connectors/httprest/
Keyhttprest
Icon🌐
Tierbuiltin (every wick app)

Configs

FieldTypeRequiredNotes
BaseURLURLBase URL of the target API. Example: https://api.example.com/v1.
AuthHeaderstringHeader name used for authentication (e.g. Authorization, X-API-Key). Empty = skip auth.
AuthValuesecretValue for the auth header (e.g. Bearer mytoken).
TimeoutSecsintPer-request timeout in seconds. Default 30.

AuthValue is marked secret so the encrypted-fields layer round-trips it as a wick_enc_ token whenever it leaves wick — see Encrypted Fields.

Operations

OpDestructiveInputDescription
getnopath, queryGET {base_url}/{path} with optional query string.
postyespath, body, content_typePOST a JSON (or text) body. Default Content-Type: application/json.
putyespath, body, content_typeFull-replacement PUT.
patchyespath, body, content_typePartial-update PATCH.
deleteyespathDELETE {base_url}/{path}.

Every non-GET op is registered with connector.OpDestructive so it is disabled by default on every new row — the admin opts in explicitly per (row, op) at /manager/connectors/httprest/{id}.

The handlers are deliberately thin (see connector.go): build the URL via service.go, dispatch via repo.go which always uses http.NewRequestWithContext so cancellation propagates correctly.

See also

  • Connector Module — module contract, file layout, the wick:"..." tag grammar.
  • MCP for LLMs — how a remote LLM discovers and calls these ops.
Built with ❤️ by a developer, for developers.