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

Breadcrumb

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

function Message::rewindBody

Attempts to rewind a message body and throws an exception on failure.

The body of the message will only be rewound if a call to `tell()` returns a value other than `0`.

Parameters

MessageInterface $message Message to rewind:

Throws

\RuntimeException

File

vendor/guzzlehttp/psr7/src/Message.php, line 97

Class

Message

Namespace

GuzzleHttp\Psr7

Code

public static function rewindBody(MessageInterface $message) : void {
    $body = $message->getBody();
    if ($body->tell()) {
        $body->rewind();
    }
}

API Navigation

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