getBody()->getContents(); if ('' !== $value) { throw new \RuntimeException('Only one "body" location may exist per operation'); } // binary string data from bound parameter $value = $command[$param->getName()]; return $request->withBody(Psr7\Utils::streamFor($value)); } }