Skip to content

Commit 618467e

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

7 files changed

+10
-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
## 2.1.1
610

711
### Changed

src/Input/CreateDeploymentInput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ public function request(): Request
254254
$headers = [
255255
'Content-Type' => 'application/x-amz-json-1.1',
256256
'X-Amz-Target' => 'CodeDeploy_20141006.CreateDeployment',
257+
'Accept' => 'application/json',
257258
];
258259

259260
// Prepare query

src/Input/GetDeploymentInput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public function request(): Request
5858
$headers = [
5959
'Content-Type' => 'application/x-amz-json-1.1',
6060
'X-Amz-Target' => 'CodeDeploy_20141006.GetDeployment',
61+
'Accept' => 'application/json',
6162
];
6263

6364
// Prepare query

src/Input/PutLifecycleEventHookExecutionStatusInput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public function request(): Request
9090
$headers = [
9191
'Content-Type' => 'application/x-amz-json-1.1',
9292
'X-Amz-Target' => 'CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus',
93+
'Accept' => 'application/json',
9394
];
9495

9596
// Prepare query

tests/Unit/Input/CreateDeploymentInputTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public function testRequest(): void
7979
POST / HTTP/1.0
8080
Content-Type: application/x-amz-json-1.1
8181
x-amz-target: CodeDeploy_20141006.CreateDeployment
82+
Accept: application/json
8283
8384
{
8485
"applicationName": "application-name",

tests/Unit/Input/GetDeploymentInputTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public function testRequest(): void
1818
POST / HTTP/1.0
1919
Content-Type: application/x-amz-json-1.1
2020
x-amz-target: CodeDeploy_20141006.GetDeployment
21+
Accept: application/json
2122
2223
{
2324
"deploymentId": "123"

tests/Unit/Input/PutLifecycleEventHookExecutionStatusInputTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function testRequest(): void
1919
POST / HTTP/1.0
2020
Content-Type: application/x-amz-json-1.1
2121
x-amz-target: CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus
22+
Accept: application/json
2223
2324
{
2425
"deploymentId": "123",

0 commit comments

Comments
 (0)