Skip to content

Commit 77d28d2

Browse files
author
ishmukhametov_tf
committed
add new required headers
1 parent f2eb4e5 commit 77d28d2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Client.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
final class Client
1616
{
17+
public const HEADER_CONTENT_TYPE = 'application/json';
18+
19+
public const HEADER_ORIGIN = 'https://store.playstation.com';
20+
1721
public readonly RequestLocatorService $requestServiceLocator;
1822

1923
public function __construct(
@@ -76,16 +80,15 @@ public function getResponse(BaseRequest $request): ResponseInterface
7680
),
7781
[
7882
'headers' => [
79-
'x-psn-store-locale-override' => $this->regionEnum->value
83+
'x-psn-store-locale-override' => $this->regionEnum->value,
84+
'content-type' => self::HEADER_CONTENT_TYPE,
85+
'origin' => self::HEADER_ORIGIN,
8086
],
8187
]
8288
);
8389

8490
} catch (Exception|GuzzleException $e) {
8591

86-
var_dump($e->getMessage());
87-
88-
exit();
8992
throw new ResponseException(
9093
$request,
9194
'An error occurred while trying to request',

0 commit comments

Comments
 (0)