Back to EIP
Recipient List
⋯
service /api/v1 on new http:Listener(8080) {
resource function post quotes/[string catergory](Message message) returns error? {
foreach var {contact, subscription} in recipientList.get(catergory) {
match subscription {
"EMAIL" => {
_ = check emailManagerClient->/send/[contact].post(message, targetType = http:Response);
}
"SMS" => {
_ = check smsManagerClient->/send/[contact].post(message, targetType = http:Response);
}
"NOTIFICATION" => {
_ = check notificationManagerClient->/send/[contact].post(message, targetType = http:Response);
}
}
}
}
}