headers['Origin'] = $options['origin']; unset($options['origin']); } parent::__construct($requestWrapper, $data, $uri, $options); } /** * Creates the resume URI. * * @return string */ protected function createResumeUri() { $headers = $this->headers + [ 'Content-Type' => $this->contentType, 'Content-Length' => 0, 'x-goog-resumable' => 'start' ]; $request = new Request( 'POST', $this->uri, $headers ); $response = $this->requestWrapper->send($request, $this->requestOptions); return $this->resumeUri = $response->getHeaderLine('Location'); } /** * Decode the response body * * @param ResponseInterface $response * @return string */ protected function decodeResponse(ResponseInterface $response) { return $response->getBody(); } }