src/Http/Formatting/RequestParser.php
public function getMimeType($request): ?string
    {
        if (!$request instanceof IHttpRequestMessage && !$request instanceof MultipartBodyPart) {
            throw new InvalidArgumentException(
                'Request must be of type ' . IHttpRequestMessage::class . ' or ' . MultipartBodyPart::class
            );
        }

        return $this->bodyParser->getMimeType($request->getBody());
    }
public function getMimeType($request): ?string
    {
        if (!$request instanceof IHttpRequestMessage && !$request instanceof MultipartBodyPart) {
            throw new InvalidArgumentException(
                'Request must be of type ' . IHttpRequestMessage::class . ' or ' . MultipartBodyPart::class
            );
        }

        return $this->bodyParser->getMimeType($request->getBody());
    }
Gets the MIME type of the body

@param IHttpRequestMessage|MultipartBodyPart $request The request or multipart body part to parse
@return string|null The mime type if one is set, otherwise null
@throws InvalidArgumentException Thrown if the request is neither a request nor a multipart body part
@throws RuntimeException Thrown if the MIME type could not be determined