Curl
class Curl
Curl wrapper
Constants
TIMEOUT |
|
Properties
static string|null | $userAgent | User agent | |
static boolean | $verbose | Verbose option |
Methods
static bool
isInsatlled()
Return true if php curl extension is installed
static mixed
request(string $url, string $method, array|string|null $data = null, array|null $headers = null, int $timeout = Self::TIMEOUT)
Run curl request
static mixed
post(string $url, array|string|null $data = null, array|null $headers = null, int $timeout = Self::TIMEOUT)
Run POST request
static mixed
get(string $url, array|null $data = null, array|null $headers = null, int $timeout = Self::TIMEOUT)
Run GET request
static mixed
delete(string $url, array|null $data = null, array|null $headers = null, integer $timeout = Self::TIMEOUT)
Run DELETE request.
static mixed
put(string $url, array|null $data = null, array|null $headers = null, int $timeout = Self::TIMEOUT)
Run PUT request
static bool
downloadFile(string $url, string $fileName, string|null $method = null, array|null $headers = null)
Download file
static mixed
getFileContent(string $url, string|null $method = null, array|null $headers = null)
Get file content
static object
downloadFileInit(object $curl, string|null $method = null, array|null $headers = null)
Init curl for file download
Details
at line 38
static bool
isInsatlled()
Return true if php curl extension is installed
at line 93
static mixed
request(string $url, string $method, array|string|null $data = null, array|null $headers = null, int $timeout = Self::TIMEOUT)
Run curl request
at line 123
static mixed
post(string $url, array|string|null $data = null, array|null $headers = null, int $timeout = Self::TIMEOUT)
Run POST request
at line 137
static mixed
get(string $url, array|null $data = null, array|null $headers = null, int $timeout = Self::TIMEOUT)
Run GET request
at line 151
static mixed
delete(string $url, array|null $data = null, array|null $headers = null, integer $timeout = Self::TIMEOUT)
Run DELETE request.
at line 165
static mixed
put(string $url, array|null $data = null, array|null $headers = null, int $timeout = Self::TIMEOUT)
Run PUT request
at line 179
static bool
downloadFile(string $url, string $fileName, string|null $method = null, array|null $headers = null)
Download file
at line 201
static mixed
getFileContent(string $url, string|null $method = null, array|null $headers = null)
Get file content
at line 217
static object
downloadFileInit(object $curl, string|null $method = null, array|null $headers = null)
Init curl for file download