Skip to content

Commit 8a8f309

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

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

CHANGELOG.md

+4
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
## 1.3.0
610

711
### Added

src/Input/PutRecordBatchInput.php

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public function request(): Request
7676
$headers = [
7777
'Content-Type' => 'application/x-amz-json-1.1',
7878
'X-Amz-Target' => 'Firehose_20150804.PutRecordBatch',
79+
'Accept' => 'application/json',
7980
];
8081

8182
// Prepare query

src/Input/PutRecordInput.php

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public function request(): Request
7373
$headers = [
7474
'Content-Type' => 'application/x-amz-json-1.1',
7575
'X-Amz-Target' => 'Firehose_20150804.PutRecord',
76+
'Accept' => 'application/json',
7677
];
7778

7879
// Prepare query

tests/Unit/Input/PutRecordBatchInputTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public function testRequest(): void
2727
POST / HTTP/1.0
2828
Content-Type: application/x-amz-json-1.1
2929
x-amz-target: Firehose_20150804.PutRecordBatch
30+
Accept: application/json
3031
3132
{
3233
"DeliveryStreamName": "streamfoo",

tests/Unit/Input/PutRecordInputTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public function testRequest(): void
2222
POST / HTTP/1.0
2323
Content-Type: application/x-amz-json-1.1
2424
x-amz-target: Firehose_20150804.PutRecord
25+
Accept: application/json
2526
2627
{
2728
"DeliveryStreamName": "streamfoo",

0 commit comments

Comments
 (0)