Skip to content

Commit 3254750

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

7 files changed

+7
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Changed
66

7+
- Add `Accept: application/json` header in request to fix incompatibility with 3rd party providers
78
- AWS enhancement: Documentation updates.
89

910
## 2.4.0

src/Input/BatchGetBuildsInput.php

+1
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' => 'CodeBuild_20161006.BatchGetBuilds',
61+
'Accept' => 'application/json',
6162
];
6263

6364
// Prepare query

src/Input/StartBuildInput.php

+1
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ public function request(): Request
644644
$headers = [
645645
'Content-Type' => 'application/x-amz-json-1.1',
646646
'X-Amz-Target' => 'CodeBuild_20161006.StartBuild',
647+
'Accept' => 'application/json',
647648
];
648649

649650
// Prepare query

src/Input/StopBuildInput.php

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function request(): Request
5555
$headers = [
5656
'Content-Type' => 'application/x-amz-json-1.1',
5757
'X-Amz-Target' => 'CodeBuild_20161006.StopBuild',
58+
'Accept' => 'application/json',
5859
];
5960

6061
// Prepare query

tests/Unit/Input/BatchGetBuildsInputTest.php

+1
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: CodeBuild_20161006.BatchGetBuilds
21+
Accept: application/json
2122
2223
{
2324
"ids": ["build1"]

tests/Unit/Input/StartBuildInputTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public function testRequest(): void
149149
POST / HTTP/1.0
150150
Content-Type: application/x-amz-json-1.1
151151
x-amz-target: CodeBuild_20161006.StartBuild
152+
Accept: application/json
152153
153154
{
154155
"artifactsOverride": {

tests/Unit/Input/StopBuildInputTest.php

+1
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: CodeBuild_20161006.StopBuild
21+
Accept: application/json
2122
2223
{
2324
"id": "build-1"

0 commit comments

Comments
 (0)