From 9c5f1be4fdfe0e0c2c37d4a384dd1604c9b43431 Mon Sep 17 00:00:00 2001 From: Martin Boer Date: Sun, 31 Aug 2025 21:55:03 +0200 Subject: [PATCH 1/2] :technologist: ignore protocol difference when prepending URL --- src/MyParcelComApi.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MyParcelComApi.php b/src/MyParcelComApi.php index 981bce9..1ecdd1a 100644 --- a/src/MyParcelComApi.php +++ b/src/MyParcelComApi.php @@ -1148,7 +1148,7 @@ public function doRequest( array $headers = [], $ttl = self::TTL_NO_CACHE, ): ResponseInterface { - if (!str_starts_with($uri, $this->apiUri)) { + if (!str_starts_with($uri, 'http')) { $uri = $this->apiUri . $uri; } $headers += $this->authenticator->getAuthorizationHeader() + [ From 79ad15cd8362a61ffefcecad4f1e9df33b1c5fae Mon Sep 17 00:00:00 2001 From: Nick de Vries Date: Tue, 2 Sep 2025 12:16:52 +0200 Subject: [PATCH 2/2] Apply suggestion from @M4tini Co-authored-by: Martin Boer --- src/MyParcelComApi.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MyParcelComApi.php b/src/MyParcelComApi.php index 1ecdd1a..cc71262 100644 --- a/src/MyParcelComApi.php +++ b/src/MyParcelComApi.php @@ -1148,7 +1148,7 @@ public function doRequest( array $headers = [], $ttl = self::TTL_NO_CACHE, ): ResponseInterface { - if (!str_starts_with($uri, 'http')) { + if (str_starts_with($uri, '/')) { $uri = $this->apiUri . $uri; } $headers += $this->authenticator->getAuthorizationHeader() + [