Skip to content

Commit 20dfcf3

Browse files
authored
Do not generate body when not needed (#291)
1 parent 5772ef8 commit 20dfcf3

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

src/Input/ListLayerVersionsRequest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ public function getMaxItems(): ?int
8181
return $this->MaxItems;
8282
}
8383

84-
public function requestBody(): string
85-
{
86-
return '{}';
87-
}
88-
8984
public function requestHeaders(): array
9085
{
9186
$headers = ['content-type' => 'application/json'];

src/LambdaClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function listLayerVersions($input): ListLayerVersionsResponse
9999

100100
$response = $this->getResponse(
101101
'GET',
102-
$input->requestBody(),
102+
null,
103103
$input->requestHeaders(),
104104
$this->getEndpoint($input->requestUri(), $input->requestQuery())
105105
);

tests/Unit/Input/ListLayerVersionsRequestTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ public function setUp(): void
2626
parent::setUp();
2727
}
2828

29-
public function testRequestBody(): void
30-
{
31-
$expected = '{
32-
}';
33-
34-
self::assertJsonStringEqualsJsonString($expected, $this->input->requestBody());
35-
}
36-
3729
public function testInvalidEnum(): void
3830
{
3931
$input = new ListLayerVersionsRequest([

0 commit comments

Comments
 (0)