public function get($path, $data = false, $mode = "get")
    {
      
        
        $this->resetDebug();
        if (is_string($data)) {
            if (!$data = json_decode($data)) {
                throw new \Exception("data is string but no JSON");
            }
        }

        $url = sprintf("%s?%s", $this->url . $path, ($data ? http_build_query($data) : ""));
        $this->debug("url", $url);

        $curl = curl_init($url);
        
        $this->setupCurl($curl);

        switch ($mode) {
            case 'delete':
                curl_setopt($curl, CURLOPT_CUSTOMREQUEST, strtoupper($mode));
                $this->debug("mode", strtoupper($mode));
                break;

            default:
                $this->debug("mode", "GET");
                break;
        }

          // use for loaclahost
           curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
           curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,false);

        
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        $curl_response = curl_exec($curl);
        $headers = curl_getinfo($curl);
        curl_close($curl);

        $this->debugEndTimer();

        return $this->returnResult($curl_response, $headers);

    }