1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-23 01:23:39 +01:00

Update request-options.rst

$request->getHeader('Content-Type'); is array;
This commit is contained in:
白俊遥 2016-12-27 17:45:24 +08:00 committed by GitHub
parent dfadff37ef
commit e34ed489a7

View File

@ -557,7 +557,7 @@ over the wire.
$clientHandler = $client->getConfig('handler');
// Create a middleware that echoes parts of the request.
$tapMiddleware = Middleware::tap(function ($request) {
echo $request->getHeader('Content-Type');
echo $request->getHeaderLine('Content-Type');
// application/json
echo $request->getBody();
// {"foo":"bar"}