getHandlerList(); $stack->appendBuild([__CLASS__, '_add_accept_header']); } public static function _add_accept_header(callable $handler) { return function ( CommandInterface $command, RequestInterface $request ) use ($handler) { $request = $request->withHeader('Accept', 'application/json'); return $handler($command, $request); }; } }