Open elfeffe opened 2 hours ago
$response = Http::withHeaders([
'Authorization' => 'Bearer XXXX',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
])->post('https://XXX/api/subscribers/XXXX/tags', [
'tags' => ['test'],
]);
Also works :)
I'm using Laravel 10, and latest mailcoach sdk (with a self hosted mailcoach, latest version). And guzzlehttp/guzzle 7.9.2
I try to do
$mailcoachSubscriber->addTags(['test']);
I have this code (MakesHttpRequests) to try to debug:I get :
Using curl in command line:
curl -X POST "https://xxx/api/subscribers/XXXX/tags" -H "Authorization: Bearer XXXX" -H "Accept: application/json" -H "Content-Type: application/json" -d '{"tags":["test"]}'
It works, so it is not mailcoach.
This is the guzzle call
This is a POST call.