Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
Wazabii committed Dec 14, 2023
1 parent 6630c5d commit 1ae4c0e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ public function getReasonPhrase()
return $this->phrase;
}

/**
* Check is status response counts as a valid response
* HTTP response status codes in the 200 range generally indicate a successful or valid response.
* @return bool
*/
public function isValidResponse(): bool
{
return ($this->statusCode >= 200 && $this->statusCode < 300);
}

/**
* Get modified date
* @return int|null
Expand Down

0 comments on commit 1ae4c0e

Please sign in to comment.