src/Proxy/DriveItemProxy.php
public function download()
    {
        $driveLocator = "/drives/{$this->parentReference->driveId}";
        $itemLocator  = "/items/{$this->id}";
        $endpoint     = "$driveLocator$itemLocator/content";

        $response = $this
            ->graph
            ->createRequest('GET', $endpoint)
            ->execute();

        $status = $response->getStatus();

        if ($status != 200) {
            throw new \Exception("Unexpected status code produced by 'GET $endpoint': $status");
        }

        return $response->getResponseAsObject(Stream::class);
    }
public function download()
    {
        $driveLocator = "/drives/{$this->parentReference->driveId}";
        $itemLocator  = "/items/{$this->id}";
        $endpoint     = "$driveLocator$itemLocator/content";

        $response = $this
            ->graph
            ->createRequest('GET', $endpoint)
            ->execute();

        $status = $response->getStatus();

        if ($status != 200) {
            throw new \Exception("Unexpected status code produced by 'GET $endpoint': $status");
        }

        return $response->getResponseAsObject(Stream::class);
    }
public function download ( ) { $ driveLocator = "/drives/{$this->parentReference->driveId}" ; $ itemLocator = "/items/{$this->id}" ; $ endpoint = "$driveLocator$itemLocator/content" ; $ response = $ this -> graph -> createRequest ( 'GET' , $ endpoint ) -> execute ( ) ; $ status = $ response -> getStatus ( ) ; if ( $ status != 200 ) { throw new \ Exception ( "Unexpected status code produced by 'GET $endpoint': $status" ) ; } return $ response -> getResponseAsObject ( Stream :: class ) ; }
Downloads this file drive item.

@return GuzzleHttp\Psr7\Stream
The content.
Downloads this file drive item .