Skip to content

Commit 7236ddb

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

19 files changed

+53
-13
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.1.0
610

711
### Added

src/Input/CreateResolverRequest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,10 @@ public function getTypeName(): ?string
278278
public function request(): Request
279279
{
280280
// Prepare headers
281-
$headers = ['content-type' => 'application/json'];
281+
$headers = [
282+
'Content-Type' => 'application/json',
283+
'Accept' => 'application/json',
284+
];
282285

283286
// Prepare query
284287
$query = [];

src/Input/DeleteResolverRequest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ public function getTypeName(): ?string
8686
public function request(): Request
8787
{
8888
// Prepare headers
89-
$headers = ['content-type' => 'application/json'];
89+
$headers = [
90+
'Content-Type' => 'application/json',
91+
'Accept' => 'application/json',
92+
];
9093

9194
// Prepare query
9295
$query = [];

src/Input/GetSchemaCreationStatusRequest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ public function getApiId(): ?string
5252
public function request(): Request
5353
{
5454
// Prepare headers
55-
$headers = ['content-type' => 'application/json'];
55+
$headers = [
56+
'Content-Type' => 'application/json',
57+
'Accept' => 'application/json',
58+
];
5659

5760
// Prepare query
5861
$query = [];

src/Input/ListApiKeysRequest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ public function getNextToken(): ?string
8383
public function request(): Request
8484
{
8585
// Prepare headers
86-
$headers = ['content-type' => 'application/json'];
86+
$headers = [
87+
'Content-Type' => 'application/json',
88+
'Accept' => 'application/json',
89+
];
8790

8891
// Prepare query
8992
$query = [];

src/Input/ListResolversRequest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ public function getTypeName(): ?string
100100
public function request(): Request
101101
{
102102
// Prepare headers
103-
$headers = ['content-type' => 'application/json'];
103+
$headers = [
104+
'Content-Type' => 'application/json',
105+
'Accept' => 'application/json',
106+
];
104107

105108
// Prepare query
106109
$query = [];

src/Input/StartSchemaCreationRequest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ public function getDefinition(): ?string
6969
public function request(): Request
7070
{
7171
// Prepare headers
72-
$headers = ['content-type' => 'application/json'];
72+
$headers = [
73+
'Content-Type' => 'application/json',
74+
'Accept' => 'application/json',
75+
];
7376

7477
// Prepare query
7578
$query = [];

src/Input/UpdateApiKeyRequest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ public function getId(): ?string
100100
public function request(): Request
101101
{
102102
// Prepare headers
103-
$headers = ['content-type' => 'application/json'];
103+
$headers = [
104+
'Content-Type' => 'application/json',
105+
'Accept' => 'application/json',
106+
];
104107

105108
// Prepare query
106109
$query = [];

src/Input/UpdateDataSourceRequest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,10 @@ public function getType(): ?string
259259
public function request(): Request
260260
{
261261
// Prepare headers
262-
$headers = ['content-type' => 'application/json'];
262+
$headers = [
263+
'Content-Type' => 'application/json',
264+
'Accept' => 'application/json',
265+
];
263266

264267
// Prepare query
265268
$query = [];

src/Input/UpdateResolverRequest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,10 @@ public function getTypeName(): ?string
278278
public function request(): Request
279279
{
280280
// Prepare headers
281-
$headers = ['content-type' => 'application/json'];
281+
$headers = [
282+
'Content-Type' => 'application/json',
283+
'Accept' => 'application/json',
284+
];
282285

283286
// Prepare query
284287
$query = [];

0 commit comments

Comments
 (0)