Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Response.php

function Response::getStatusMessage

File

vendor/composer/composer/src/Composer/Util/Http/Response.php, line 53

Class

Response
@phpstan-type Request array{url: non-empty-string, options?: mixed[], copyTo?: string|null}

Namespace

Composer\Util\Http

Code

public function getStatusMessage() : ?string {
    $value = null;
    foreach ($this->headers as $header) {
        if (Preg::isMatch('{^HTTP/\\S+ \\d+}i', $header)) {
            // In case of redirects, headers contain the headers of all responses
            // so we can not return directly and need to keep iterating
            $value = $header;
        }
    }
    return $value;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal