src/WebService.php
protected function make( $isPost = false ){

       $ch = curl_init( $this->requestUrl );

       if( $isPost ){
        curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
        curl_setopt($ch,CURLOPT_POST, 1);
        curl_setopt($ch,CURLOPT_POSTFIELDS, $isPost );
       }

      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verifySSL);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

       $output = curl_exec($ch);


      if( $output === false ){
          throw new \ErrorException( curl_error($ch) );
      }


      curl_close($ch);
      return $output;

    }
protected function make( $isPost = false ){

       $ch = curl_init( $this->requestUrl );

       if( $isPost ){
        curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
        curl_setopt($ch,CURLOPT_POST, 1);
        curl_setopt($ch,CURLOPT_POSTFIELDS, $isPost );
       }

      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verifySSL);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

       $output = curl_exec($ch);


      if( $output === false ){
          throw new \ErrorException( curl_error($ch) );
      }


      curl_close($ch);
      return $output;

    }
protected function make ( $ isPost = false ) { $ ch = curl_init ( $ this -> requestUrl ) ; if ( $ isPost ) { curl_setopt ( $ ch , CURLOPT_HTTPHEADER , [ 'Content-Type: application/json' ] ) ; curl_setopt ( $ ch , CURLOPT_POST , 1 ) ; curl_setopt ( $ ch , CURLOPT_POSTFIELDS , $ isPost ) ; } curl_setopt ( $ ch , CURLOPT_SSL_VERIFYPEER , $ this -> verifySSL ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , true ) ; curl_setopt ( $ ch , CURLOPT_FOLLOWLOCATION , true ) ; $ output = curl_exec ( $ ch ) ; if ( $ output === false ) { throw new \ ErrorException ( curl_error ( $ ch ) ) ; } curl_close ( $ ch ) ; return $ output ; }
Make cURL request to given URL
@param boolean $isPost
@return object
Make cURL request to given URL