Skip to content

Commit 91f70fc

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

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-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.0.2
610

711
### Changed

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' => 'Timestream_20181101.DescribeEndpoints',
40+
'Accept' => 'application/json',
4041
];
4142

4243
// Prepare query

src/Input/WriteRecordsRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public function request(): Request
113113
$headers = [
114114
'Content-Type' => 'application/x-amz-json-1.0',
115115
'X-Amz-Target' => 'Timestream_20181101.WriteRecords',
116+
'Accept' => 'application/json',
116117
];
117118

118119
// Prepare query

tests/Unit/Input/DescribeEndpointsRequestTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public function testRequest(): void
1717
POST / HTTP/1.0
1818
Content-Type: application/x-amz-json-1.0
1919
x-amz-target: Timestream_20181101.DescribeEndpoints
20+
Accept: application/json
2021
2122
{
2223
}

tests/Unit/Input/WriteRecordsRequestTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public function testRequest(): void
4141
POST / HTTP/1.0
4242
Content-Type: application/x-amz-json-1.0
4343
x-amz-target: Timestream_20181101.WriteRecords
44+
Accept: application/json
4445
4546
{
4647
"CommonAttributes": {

0 commit comments

Comments
 (0)