Skip to content

Conversation

@re8260
Copy link
Contributor

@re8260 re8260 commented Feb 12, 2020

Added option to store response body in class variable and get it by getLastResponseBody() function.
This is needed for example to log response data.

Same functionality exists in:

Usage

$client = new \Iris\Client($login, $password, ['url' => 'https://dashboard.bandwidth.com/api/']);
$account = new \Iris\Account($your_account_id, $client);
$account->availableNumbers([ "areaCode" => "818" ]);
$lastResponse = $client->getLastResponseBody();

$lastResponse =
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><SearchResult><ResultCount>2</ResultCount><TelephoneNumberList><TelephoneNumber>8182132977</TelephoneNumber><TelephoneNumber>8182728306</TelephoneNumber></TelephoneNumberList></SearchResult>

@jmulford-bw jmulford-bw merged commit c4984fb into Bandwidth:master Feb 24, 2020
@jmulford-bw
Copy link
Contributor

Thanks @re8260!

@re8260
Copy link
Contributor Author

re8260 commented Feb 24, 2020

@jhindman-bw Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants