function validate() { try { Tinify::getClient()->request("post", "/shrink"); } catch (ClientException $e) { return true; } }
public function result() { $response = Tinify::getClient()->request("get", $this->url, $this->commands); return new Result($response["headers"], $response["body"]); }
function validate() { try { Tinify::getClient()->request("post", "/shrink"); } catch (AccountException $err) { if ($err->status == 429) { return true; } throw $err; } catch (ClientException $err) { return true; } }