There’s no documentation about a POST request in particular, but I already posted this example in the other thread:
Here is another example wrapped in a class method for sending data to Campaign Monitor:
public static function registerSubscriber( $data ) {
// send data to Campaign-Monitor and wait for response
$listId = option('cm.listIdMarketing');
$endPoint = 'subscribers/' . $listId . '.json';
$postData = [
'EmailAddress' => trim($data['email']),
'Name' => strip_tags(trim($data['name'])),
'ConsentToTrack' => 'No',
];
$options = [
'headers' => [
'Authorization: Basic ' . base64_encode(option('cm.apikey') . ':')
],
'method' => 'POST',
'data' => json_encode($postData),
];
return Remote::request(option('cm.baseURL') . $endPoint, $options);
}