private function canonicalizeResourcePath($resourcePath)
 {
     if ($resourcePath) {
         return RequestUtils::encodeUrl($resourcePath, true, true);
     } else {
         return '/';
     }
 }
 function toStrQueryString($canonical)
 {
     $result = '';
     $queryString = $this->getQueryString();
     if ($queryString) {
         //need to sort the query string to authenticate using Sauthc1
         ksort($queryString);
         foreach ($queryString as $key => $value) {
             $encodedKey = RequestUtils::encodeUrl($key, false, $canonical);
             $encodedValue = RequestUtils::encodeUrl($value, false, $canonical);
             if ($result) {
                 $result .= '&';
             }
             $result .= $encodedKey . '=' . $encodedValue;
         }
     }
     return $result;
 }