ResponseInterface
in
Interface for HTTP response objects.
Response objects encapsulate HTTP response data (status, headers, body) and can be sent by the router after controller execution.
Tags
Table of Contents
Methods
- getStatusCode() : int
- Get the HTTP status code.
- send() : void
- Send the response to the client.
Methods
getStatusCode()
Get the HTTP status code.
public
getStatusCode() : int
Return values
int —HTTP status code (e.g., 200, 302, 404)
send()
Send the response to the client.
public
send() : void
This method outputs headers and body content.