RollingCurl\RollingCurl::get PHP Method

get() public method

Perform GET request
public get ( string $url, array $headers = null, array $options = null ) : RollingCurl
$url string
$headers array
$options array
return RollingCurl
    public function get($url, $headers = null, $options = null)
    {
        return $this->request($url, "GET", null, $headers, $options);
    }

Usage Example

Ejemplo n.º 1
0
 public function performAction()
 {
     $rollingCurl = new RollingCurl();
     foreach ($this->getPerlTablesUrlList() as $url) {
         $rollingCurl->get($url);
     }
     $rollingCurl->setCallback(function (Request $request, RollingCurl $rollingCurl) {
         $this->response->addContent($request->getUrl());
         $content = $request->getResponseText();
         $this->parsePerlTable($content);
     })->execute();
 }