Skip to content

Commit

Permalink
Fix sending post requests
Browse files Browse the repository at this point in the history
During the refactor of get and post methods this bug was introduced, when setting the body, that method
returns an modified object with the supplied body (immutable).
  • Loading branch information
Jonas De Keukelaere committed Nov 23, 2022
1 parent 5f6de7d commit 6aa5ff0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Teamleader.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private function doRequest(string $method, string $uri, array $parameters = []):
}

$body = $this->streamFactory->createStream($encodedParameters);
$request->withBody($body);
$request = $request->withBody($body);
}

$response = $this->client->sendRequest($request);
Expand Down

0 comments on commit 6aa5ff0

Please sign in to comment.