Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Commit

Permalink
Add form_params to guzzle http request
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjosh committed Feb 3, 2017
1 parent 54d418b commit cee646a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ public function generalStat()
public function setExpense($amount, $text)
{
$response = $this->guzzle->post('/submit/expense',[
'token' => $this->token,
'amount' => $amount,
'text' => $text
'form_params' => [
'token' => $this->token,
'amount' => $amount,
'text' => $text
]
]);

return json_decode($response->getBody()->getContents(), true);
Expand All @@ -89,9 +91,11 @@ public function setExpense($amount, $text)
public function setIncome($amount, $text)
{
$response = $this->guzzle->post($this->baseUrl . '/submit/income',[
'token' => $this->token,
'amount' => $amount,
'text' => $text
'form_params' => [
'token' => $this->token,
'amount' => $amount,
'text' => $text
]
]);

return json_decode($response->getBody()->getContents(), true);
Expand Down

0 comments on commit cee646a

Please sign in to comment.