Skip to content

Commit 1ae4c0e

Browse files
author
Wazabii
committed
Minor update
1 parent 6630c5d commit 1ae4c0e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Response.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ public function getReasonPhrase()
133133
return $this->phrase;
134134
}
135135

136+
/**
137+
* Check is status response counts as a valid response
138+
* HTTP response status codes in the 200 range generally indicate a successful or valid response.
139+
* @return bool
140+
*/
141+
public function isValidResponse(): bool
142+
{
143+
return ($this->statusCode >= 200 && $this->statusCode < 300);
144+
}
145+
136146
/**
137147
* Get modified date
138148
* @return int|null

0 commit comments

Comments
 (0)