Issue an HTTP GET request

@throws Exception

@param string $url - GET URL
@param array  $customHeaders

@return HttpResponse
425741
public function get($url, array $customHeaders = [])
    {
        return $this->handleFailover(function() use ($url, $customHeaders) {
            $response = $this->executeRequest(HttpHelper::METHOD_GET, $url, '', $customHeaders);

            return $this->parseResponse($response);
        });
    }
1299301
public static function get(
        int $credentialPasswordIpId,
        int $permittedIpId,
        array $customHeaders = []
    ): BunqResponsePermittedIp {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->get(
            vsprintf(
                self::ENDPOINT_URL_READ,
                [static::determineUserId(), $credentialPasswordIpId, $permittedIpId]
            ),
            [],
            $customHeaders
        );

        return BunqResponsePermittedIp::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_GET)
        );
    }
290236
public function get(string $url, array $headers = [])
    {
        $ctx = $this->getContext('GET', null, $headers);
        $response = file_get_contents($url, false, $ctx);
        $this->saveCookies($http_response_header);

        return $response;
    }
1135537
public static function get(
        int $draftShareInviteApiKeyId,
        array $customHeaders = []
    ): BunqResponseDraftShareInviteApiKey {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->get(
            vsprintf(
                self::ENDPOINT_URL_READ,
                [static::determineUserId(), $draftShareInviteApiKeyId]
            ),
            [],
            $customHeaders
        );

        return BunqResponseDraftShareInviteApiKey::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_GET)
        );
    }
416645
public static function get(int $draftShareInviteBankId, array $customHeaders = []): BunqResponseDraftShareInviteBank
    {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->get(
            vsprintf(
                self::ENDPOINT_URL_READ,
                [static::determineUserId(), $draftShareInviteBankId]
            ),
            [],
            $customHeaders
        );

        return BunqResponseDraftShareInviteBank::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_GET)
        );
    }
531009
public static function get($url, $httpHeaders = array())
    {
        self::prepareRequest($httpHeaders);

        $response = CurlRequest::get($url, self::$httpHeaders);

        return self::processResponse($response);
    }
554479
public function get($url, $headers = [], $parameters = null)
    {
        return $this->send(Method::GET, $url, $parameters, $headers);
    }
475217
private function getRemoteData(string $url): ResponseInterface
    {
        $context      = $this->streamHelper->getStreamContext();
        $stream       = @fopen($url, 'rb', false, $context);

        if (false === $stream) {
            throw new Exception('could not initialize the connection to load the data');
        }

        $timeout = $this->loader->getTimeout();

        stream_set_timeout($stream, $timeout);
        stream_set_blocking($stream, true);

        $meta    = stream_get_meta_data($stream);
        $headers = [];
        $code    = 200;

        if (isset($meta['wrapper_data']) && is_array($meta['wrapper_data'])) {
            $headers = $meta['wrapper_data'];

            foreach ($headers as $metaData) {
                if ('http/' === mb_substr(mb_strtolower($metaData), 0, 5)) {
                    $tmp_status_parts = explode(' ', $metaData, 3);
                    $code             = $tmp_status_parts[1];

                    break;
                }
            }
        }

        return new Response($code, $headers, new Stream($stream));
    }
1184363
protected function fetchProviderData($url, array $headers = [])
    {
        $client = $this->getProvider()->getHttpClient();
        $client->setBaseUrl($url);

        if ($headers)
        {
            $client->setDefaultOption('headers', $headers);
        }

        $request = $client->get()->send();
        $response = $request->getBody();

        return $response;
    }
130092
public function post( $url, $postFields = null, $headers = array() ) {
		$this->assertString( 'url', $url );

		if ( !is_string( $postFields ) && !is_array( $postFields ) && !is_null( $postFields ) ) {
			throw new \InvalidArgumentException( '$postFields must be a string, array or null' );
		}

		if ( !isset( $this->conn ) ) {
			$this->connect();
		}

		$this->setCurlPostOpts( $url, $postFields, $headers );

		return $this->request();
	}
1035490
public function post($url, $data, array $customHeaders = [])
    {
        return $this->handleFailover(function() use ($url, $data, $customHeaders) {
            $response = $this->executeRequest(HttpHelper::METHOD_POST, $url, $data, $customHeaders);

            return $this->parseResponse($response);
        });
    }
763336
public static function create(int $oauthClientId, string $url, array $customHeaders = []): BunqResponseInt
    {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId(), $oauthClientId]
            ),
            [self::FIELD_URL => $url],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
993676
public function get($url, array $params = [], array $headers = [])
    {
        $url = $this->formatUrl($url, $url !== 'current/Me', $url == $this->nextUrl);

        try {
            $request = $this->createRequest('GET', $url, null, $params, $headers);
            $response = $this->client()->send($request);

            return $this->parseResponse($response, $url != $this->nextUrl);
        } catch (Exception $e) {
            $this->parseExceptionForErrorMessages($e);
        }
    }
132166
protected function get($url, array $headers)
    {
        $request = [
            'headers' => array_merge(
                ['Content-Type' => 'application/json'],
                $headers
            ),
            'exceptions' => false,
        ];

        $this->request('get', $url, $request);
    }
265827
public static function get(int $invoiceByUserId, array $customHeaders = []): BunqResponseInvoiceByUser
    {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->get(
            vsprintf(
                self::ENDPOINT_URL_READ,
                [static::determineUserId(), $invoiceByUserId]
            ),
            [],
            $customHeaders
        );

        return BunqResponseInvoiceByUser::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_GET)
        );
    }
2434
public static function get($url, $headers = [], $parameters = null)
    {
        return Request::create('default')->get($url, $headers, $parameters);
    }
371297
private function buildRequest($url, array $headers = []): RequestInterface
    {
        $request = $this->requestFactory->createRequest('GET', $url);
        foreach ($headers as $header => $value) {
            $request = $request->withHeader($header, $value);
        }

        return $request;
    }