Skip to content

Commit 4d8408a

Browse files
authored
Add an accept header in JSON request to help 3rd party services like localstack (#1721)
1 parent e11f535 commit 4d8408a

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Changed
6+
7+
- Add `Accept: application/json` header in request to fix incompatibility with 3rd party providers
8+
59
## 1.6.0
610

711
### Added

src/Input/GetAuthorizationTokenRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public function request(): Request
6060
$headers = [
6161
'Content-Type' => 'application/x-amz-json-1.1',
6262
'X-Amz-Target' => 'AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken',
63+
'Accept' => 'application/json',
6364
];
6465

6566
// Prepare query

tests/Unit/Input/GetAuthorizationTokenRequestTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public function testRequest(): void
1616
POST / HTTP/1.0
1717
Content-Type: application/x-amz-json-1.1
1818
x-amz-target: AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken
19+
Accept: application/json
1920
2021
{}
2122
';

0 commit comments

Comments
 (0)