http Service
HTTP capability acquired through a declared System Service.
Contract http · 1.0.0-draft.1
Functions
send
HttpResult, or null for configured asynchronous submission.
| Argument | Type | Required | Default |
|---|---|---|---|
| body | core.payload? | No | null |
| overrides | http.RequestOverrides? | No | null |
Returns: http.HttpResult?
Behavior
- send takes the body first and optional request overrides second. A one-argument object is always the body. Omitted or null body means no body. Only post, put and patch transmit it.
- Bytes pass unchanged; strings encode as UTF-8 without quoting; other data serialize through Object.asString and UTF-8. Set the appropriate content type explicitly.
- HttpResult exposes status, case-insensitive headers containing arrays of values, and bytes. Decode and parse response bytes explicitly.
- Configured asynchronous submission returns null and discards the eventual response. It is not durable delivery and differs from an AIScript async scope.