protected function RemotePostWebformHandler::responseHasError in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformHandler/RemotePostWebformHandler.php \Drupal\webform\Plugin\WebformHandler\RemotePostWebformHandler::responseHasError()
Determine if response has an error status code.
Parameters
\Psr\Http\Message\ResponseInterface|null $response: The response returned by the remote server.
Return value
bool TRUE if response status code reflects an unsuccessful value.
2 calls to RemotePostWebformHandler::responseHasError()
- RemotePostWebformHandler::displayCustomResponseMessage in src/
Plugin/ WebformHandler/ RemotePostWebformHandler.php - Display custom response message.
- RemotePostWebformHandler::remotePost in src/
Plugin/ WebformHandler/ RemotePostWebformHandler.php - Execute a remote post.
File
- src/
Plugin/ WebformHandler/ RemotePostWebformHandler.php, line 1188
Class
- RemotePostWebformHandler
- Webform submission remote post handler.
Namespace
Drupal\webform\Plugin\WebformHandlerCode
protected function responseHasError($response) {
$status_code = $response
->getStatusCode();
return $status_code < 200 || $status_code >= 300;
}