Skip to content

Commit f2297f7

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

35 files changed

+48
-13
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
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
## 3.2.0

src/Input/BatchGetItemInput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ public function request(): Request
135135
$headers = [
136136
'Content-Type' => 'application/x-amz-json-1.0',
137137
'X-Amz-Target' => 'DynamoDB_20120810.BatchGetItem',
138+
'Accept' => 'application/json',
138139
];
139140

140141
// Prepare query

src/Input/BatchWriteItemInput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ public function request(): Request
125125
$headers = [
126126
'Content-Type' => 'application/x-amz-json-1.0',
127127
'X-Amz-Target' => 'DynamoDB_20120810.BatchWriteItem',
128+
'Accept' => 'application/json',
128129
];
129130

130131
// Prepare query

src/Input/CreateTableInput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ public function request(): Request
407407
$headers = [
408408
'Content-Type' => 'application/x-amz-json-1.0',
409409
'X-Amz-Target' => 'DynamoDB_20120810.CreateTable',
410+
'Accept' => 'application/json',
410411
];
411412

412413
// Prepare query

src/Input/DeleteItemInput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ public function request(): Request
347347
$headers = [
348348
'Content-Type' => 'application/x-amz-json-1.0',
349349
'X-Amz-Target' => 'DynamoDB_20120810.DeleteItem',
350+
'Accept' => 'application/json',
350351
];
351352

352353
// Prepare query

src/Input/DeleteTableInput.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.0',
6060
'X-Amz-Target' => 'DynamoDB_20120810.DeleteTable',
61+
'Accept' => 'application/json',
6162
];
6263

6364
// Prepare query

src/Input/DescribeEndpointsRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public function request(): Request
3737
$headers = [
3838
'Content-Type' => 'application/x-amz-json-1.0',
3939
'X-Amz-Target' => 'DynamoDB_20120810.DescribeEndpoints',
40+
'Accept' => 'application/json',
4041
];
4142

4243
// Prepare query

src/Input/DescribeTableInput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public function request(): Request
5959
$headers = [
6060
'Content-Type' => 'application/x-amz-json-1.0',
6161
'X-Amz-Target' => 'DynamoDB_20120810.DescribeTable',
62+
'Accept' => 'application/json',
6263
];
6364

6465
// Prepare query

src/Input/ExecuteStatementInput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public function request(): Request
165165
$headers = [
166166
'Content-Type' => 'application/x-amz-json-1.0',
167167
'X-Amz-Target' => 'DynamoDB_20120810.ExecuteStatement',
168+
'Accept' => 'application/json',
168169
];
169170

170171
// Prepare query

src/Input/GetItemInput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ public function request(): Request
214214
$headers = [
215215
'Content-Type' => 'application/x-amz-json-1.0',
216216
'X-Amz-Target' => 'DynamoDB_20120810.GetItem',
217+
'Accept' => 'application/json',
217218
];
218219

219220
// Prepare query

0 commit comments

Comments
 (0)