Documentation
¶
Overview ¶
Package http is the builtin Orchard provider for HTTP requests.
Exposes a single action — "request" — that issues an HTTP call and captures the response as structured output (status, body, headers). Intended as a thin, predictable wrapper over net/http, not a rich client with retries or circuit breakers. Scenarios that need those compose them via dependency ordering or wait for the future retry/timeout features at the action level.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is the HTTP provider implementation.
func New ¶
func New() *Provider
New returns an unconfigured HTTP provider. Schema is parsed once at construction so any authoring error in the embedded schema.hcl fails loudly on startup rather than at first use.
func (*Provider) Close ¶
Close has nothing to release — net/http.Client owns its own idle-connection pool and cleans up via Go's runtime.
func (*Provider) Configure ¶
Configure reads base_url, default_headers, and timeout_seconds from the scenario's provider block and constructs the shared http.Client. The timeout applies to the full request/response round-trip.
func (*Provider) Execute ¶
func (p *Provider) Execute(ctx context.Context, action string, attrs map[string]cty.Value) (map[string]cty.Value, error)
Execute dispatches to the "request" action. Unknown actions are rejected — the schema declares only "request", and the engine should have caught anything else at route-building time.
func (*Provider) Schema ¶
func (p *Provider) Schema() protocol.ProviderSchema
Schema returns the embedded provider schema.