can cURL operations be inside the API server side code?
<p>I see an example server side API that has cURL operations, I thought cURL is supposedly client side request. The following class API is the server side code but inherited from newtwork class which has a bunch of uCurls operations.</p>

<blockquote>
  <p>class Api extends Api\Network</p>

<pre><code>abstract class Network {
const GET  = 'GET';
const POST = 'POST';

const HTTP_OK      = 200;
const HTTP_CREATED = 201;

protected function curl($type, $url, $queryString = array())
{
    $s = curl_init();
    switch (strtoupper($type)) {
        case self::POST:
            echo "$url\n";
            echo \http_build_query($queryString) . "\n";
                die();
            curl_setopt($s, CURLOPT_URL, $url);
            curl_setopt($s, CURLOPT_POST, true);
            curl_setopt($s, CURLOPT_POSTFIELDS, $queryString);
            break;
        case self::GET:
            curl_setopt($s, CURLOPT_URL, $url . '?' .
</code></pre>
  
  <p>http_build_query($queryString));
                  break;
          }</p>

<pre><code>    curl_setopt($s, CURLOPT_RETURNTRANSFER, true);
    $_out = curl_exec($s);
    $status = curl_getinfo($s, CURLINFO_HTTP_CODE);
    curl_close($s);
    switch ($status) {
        case self::HTTP_OK:
        case self::HTTP_CREATED:
            $out = $_out;
            break;
        default:
            throw new \Exception("http error: {$status}",
</code></pre>
  
  <p>$status);
          }
          return $out;
      } }</p>
</blockquote>
