Response
class Response (View source)
Properties
string|null | $content | Define the request content |
Methods
Parser constructor.
Get response content
Get response content as json
Get response content as json
Get the response headers
Get the response code
Alias of getCode
Check if status code is successful
Check if status code is failed
Get the response executing time
Get the request connexion time
Get the response upload size
Get the request upload speed
Get the download size
Get the download speed
Get error message
Get error code
Get the response content type
Details
__construct(CurlHandle $ch, string|null $content = null)
Parser constructor.
string|null
getContent()
Get response content
object|array
toJson(bool|null $associative = null)
Get response content as json
array
toArray()
Get response content as json
array
getHeaders()
Get the response headers
int|null
getCode()
Get the response code
int|null
statusCode()
Alias of getCode
bool
isSuccessful()
Check if status code is successful
bool
isFailed()
Check if status code is failed
int|null
getExecutionTime()
Get the response executing time
float|null
getConnexionTime()
Get the request connexion time
float|null
getUploadSize()
Get the response upload size
float|null
getUploadSpeed()
Get the request upload speed
float|null
getDownloadSize()
Get the download size
float|null
getDownloadSpeed()
Get the download speed
string
getErrorMessage()
Get error message
int
getErrorNumber()
Get error code
string|null
getContentType()
Get the response content type