Response — Reference
Send a specific HTTP response body and status.
Send a specific HTTP response body and status.
Before you begin
Section titled “Before you begin”- An open Server Connect action. Runtime differences below refer to the installed Node.js and PHP implementations.
Response
Section titled “Response”Send a specific HTTP response body and status.
Settings and execution
Section titled “Settings and execution”| Setting | Meaning |
|---|---|
| Name | Optional identifier for the response step. The body is the configured data, not a new wrapper under this name. |
| Status | The HTTP response status. Supply a numeric status such as 200 or 422; the runtime falls back to 200 when the status is absent or unsuitable. |
| Data Type | Selects the editor for Text or Object data. It is not a MIME-type selector and does not guarantee identical text output across server models. |
| Text Data | The value sent as the response body when using Text. Node.js defaults to JSON response handling, so a string can be JSON-encoded; PHP’s response handler writes a string as text. |
| Input Data | The name/value fields of an Object response. For example, an ok boolean and a message string produce a structured body. |
Worked example
Section titled “Worked example”Choose Object, set Status to 200, and add ok = true and message = Saved. Run the action and inspect both status and body. The body should contain those fields directly, not under the response step’s optional Name.
Check the behavior and limits
Section titled “Check the behavior and limits”Put the response after the required work: further steps should not be used for processing after the response has been sent. Node.js supports a contentType runtime option, but this inspector rule only offers the body’s Data Type; verify headers when returning a non-JSON response.
Continue with a task
Section titled “Continue with a task”Use the Server Connect guides when you need the surrounding project, data-loading or form procedure.
Check your result
Section titled “Check your result”You can configure Response deliberately and verify the result and failure behavior described in this reference.