Skip to content

Commit d4ff252

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

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-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.1.2
610

711
### Changed

src/Input/DetectDominantLanguageRequest.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' => 'Comprehend_20171127.DetectDominantLanguage',
58+
'Accept' => 'application/json',
5859
];
5960

6061
// Prepare query

tests/Unit/Input/DetectDominantLanguageRequestTest.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: Comprehend_20171127.DetectDominantLanguage
21+
Accept: application/json
2122
2223
{
2324
"Text": "This is my example text"

0 commit comments

Comments
 (0)