Closed grogy closed 3 years ago
Hi, your idea is great.
I have one issue:
You put returned value whole request body as a string only. But usually it will be JSON. Please try add to returned valued Mimetype (content-type
header) of response too for better ability to manipulation with returned value.
Hello,
yes, it's possible :)
Changed are implemented in PR, example for try it is:
<?php
require_once __DIR__ . '/vendor/autoload.php';
$ecomail = new Ecomail('secret_token');
var_dump($ecomail->sendTransactionalTemplate([
'template_id' => 1,
'to' => [
'email' => 'customer@domain.tld',
],
]));
This PR has not BC break.
Why do it? When user (programmer) send incorrect request than he isn't feedback what is bad. Example:
The current output is:
Okey.. something is bad. But what? Incorrect data? Expired account? Something in network? Some else?
Output after small change in this PR:
What do you mean? :)