RollingCurl\RollingCurl::request PHP Method

request() public method

Create new Request and add it to the request queue
public request ( string $url, string $method = "GET", array | string $postData = null, array $headers = null, array $options = null ) : RollingCurl
$url string
$method string
$postData array | string
$headers array
$options array
return RollingCurl
    public function request($url, $method = "GET", $postData = null, $headers = null, $options = null)
    {
        $newRequest = new Request($url, $method);
        if ($postData) {
            $newRequest->setPostData($postData);
        }
        if ($headers) {
            $newRequest->setHeaders($headers);
        }
        if ($options) {
            $newRequest->setOptions($options);
        }
        return $this->add($newRequest);
    }