Skip to content

Commit

Permalink
Add an accept header in JSON request to help 3rd party services like …
Browse files Browse the repository at this point in the history
…localstack (#1721)
  • Loading branch information
jderusse authored Jun 5, 2024
1 parent a48b213 commit 3254750
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Changed

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

## 2.4.0
Expand Down
1 change: 1 addition & 0 deletions src/Input/BatchGetBuildsInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function request(): Request
$headers = [
'Content-Type' => 'application/x-amz-json-1.1',
'X-Amz-Target' => 'CodeBuild_20161006.BatchGetBuilds',
'Accept' => 'application/json',
];

// Prepare query
Expand Down
1 change: 1 addition & 0 deletions src/Input/StartBuildInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ public function request(): Request
$headers = [
'Content-Type' => 'application/x-amz-json-1.1',
'X-Amz-Target' => 'CodeBuild_20161006.StartBuild',
'Accept' => 'application/json',
];

// Prepare query
Expand Down
1 change: 1 addition & 0 deletions src/Input/StopBuildInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public function request(): Request
$headers = [
'Content-Type' => 'application/x-amz-json-1.1',
'X-Amz-Target' => 'CodeBuild_20161006.StopBuild',
'Accept' => 'application/json',
];

// Prepare query
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Input/BatchGetBuildsInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public function testRequest(): void
POST / HTTP/1.0
Content-Type: application/x-amz-json-1.1
x-amz-target: CodeBuild_20161006.BatchGetBuilds
Accept: application/json
{
"ids": ["build1"]
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Input/StartBuildInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public function testRequest(): void
POST / HTTP/1.0
Content-Type: application/x-amz-json-1.1
x-amz-target: CodeBuild_20161006.StartBuild
Accept: application/json
{
"artifactsOverride": {
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Input/StopBuildInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public function testRequest(): void
POST / HTTP/1.0
Content-Type: application/x-amz-json-1.1
x-amz-target: CodeBuild_20161006.StopBuild
Accept: application/json
{
"id": "build-1"
Expand Down

0 comments on commit 3254750

Please sign in to comment.