Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
client: fixes legacy guzzle request objects instantiation
Theres a big difference between `5.*` and `6.*` guzzle majors. So, in the `PagarMe\Sdk\Client::buildRequest` method the sdk should instantiate the correct request object accordingly its contracts, in this case twice: `\GuzzleHttp\Message\Request` and `\GuzzleHttp\Psr7\Request`. If the user define request options, in guzzle `5.*` this options should be within the request object. If the major is `6.*` the options should be informed on `\GuzzleHttp\Client::send()` method as a second argument. This fixes the described behavior above informing the request options on the right places.
- Loading branch information