Beta: send one HTTP request to a running Sandbox
const url = 'https://example.com/apis/nodus.dev/v1/namespaces/example/sandboxes/example/http';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"body":"example","headers":{"additionalProperty":["example"]},"method":"example","path":"example","port":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/apis/nodus.dev/v1/namespaces/example/sandboxes/example/http \ --header 'Content-Type: application/json' \ --data '{ "body": "example", "headers": { "additionalProperty": [ "example" ] }, "method": "example", "path": "example", "port": 1 }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The project.
The object’s name.
Request Bodyrequired
Section titled “ Request Bodyrequired ”SandboxHTTPRequest sends one bounded HTTP request to a running Sandbox’s loopback port. It never starts stopped compute, follows redirects or retries the application request.
object
Body is base64-encoded on the JSON wire and is limited to 1 MiB after decoding.
Headers are explicit application headers. Platform credentials and transport headers are never forwarded.
object
Method is GET, HEAD, POST, PUT, PATCH, DELETE or OPTIONS.
Path is an origin-relative path with an optional query, such as /health?full=true.
Port is the application’s TCP port, from 1024 through 65535 except Nodus-reserved ports.
Example generated
{ "body": "example", "headers": { "additionalProperty": [ "example" ] }, "method": "example", "path": "example", "port": 1}Responses
Section titled “ Responses ”OK
SandboxHTTPResponse contains an application response as data, never executable API-origin content. A successful relay returns HTTP 200 even when StatusCode is an application error or redirect.
object
Body is base64-encoded on the JSON wire and limited to 2 MiB after decoding.
Headers are the application’s end-to-end headers, as data rather than API response headers.
object
StatusCode is the application’s HTTP status.
Example generated
{ "body": "example", "headers": { "additionalProperty": [ "example" ] }, "statusCode": 1}default
Section titled “ default ”An error: a metav1.Status whose reason is a registered code.
Status is the error body of every API response: a Kubernetes metav1.Status (so kubectl and client-go understand it) plus three top-level extensions that those clients ignore (ADR-028).
object
object
object
Docs is the URL of the code’s docs page.
Fix says what to do next, for example a CLI command or the field to change.
object
object
RequestID identifies the request in logs and support tickets.
Example generated
{ "apiVersion": "example", "code": 1, "details": { "causes": [ { "field": "example", "message": "example", "reason": "example" } ], "group": "example", "kind": "example", "name": "example", "retryAfterSeconds": 1, "uid": "example" }, "docs": "example", "fix": "example", "kind": "example", "message": "example", "metadata": { "continue": "example", "remainingItemCount": 1, "resourceVersion": "example", "selfLink": "example", "shardInfo": { "selector": "example" } }, "reason": "example", "requestId": "example", "status": "example"}