public UnityRestRequest Post <T> (string endpoint = null)
 {
     if (string.IsNullOrEmpty(endpoint))
     {
         endpoint = UnityRestUtils.GetDescription(typeof(T));
     }
     return(new UnityRestRequest(HttpVerb.Post, Url, endpoint, this));
 }
 private void HandleResult(UnityWebRequest request)
 {
     if (request.isError)
     {
         TryRaiseError(request.error);
     }
     else if (UnityRestUtils.HasErrorStatusCode(request.responseCode))
     {
         TryRaiseError(string.Format("Has error status code: {0}", request.responseCode));
     }
     else if (responseHandler != null)
     {
         responseHandler.OnResponse(request.downloadHandler.text);
     }
     else if (onResult != null)
     {
         onResult();
     }
 }