Response Object
The Response object allows you to work with HTTP network request responses in your application. It provides methods to access the status code, headers, body, and additional information associated with the response from Network class.
- Class namespace:
\Luminova\Http\Message\Response
getStatusCode
Get the HTTP status code of the response.
public getStatusCode(): intReturn Value:
int - The status code.
getHeaders
Get the response headers.
public getHeaders(): arrayReturn Value:
array - The response headers.
getBody
Get the response body.
public getBody(): mixedReturn Value:
mixed - The response body.
getContents
Get the response contents.
public getContents(): mixedReturn Value:
mixed - The response contents.
getInfo
Get the response info.
public getInfo(): arrayReturn Value:
array - The response info.