SendSMSController class
Введение
- Описание: Контроллер
SendSMSControllerиспользуется для отправки сообщений в систему SendPulls. - Маршруты: Обрабатываются POST-запрос по маршруту
/sendpulse/send-sms.
Формат запроса
Тело запроса: JSON-объект, содержащий идентификатор пользователя.
{
"message": "message",
"phone": "+56543345123"
}
Основная логика
- Отправка сообщений: Контроллер отправляет sms по маршруту
https://api.sendpulse.com/sms/send.
Взаимодействие с микросервисами
Ответы сервера
- Успешное выполнение: Ожидаемый статус -
200 OK.{ "message": "Sendpulse: SMS sent" } - Ошибки обработки: Возможны различные ошибки.
- Ошибка при отправке сообщений. Ожидаемый статус -
500 internalServerError.
- Ошибка при отправке сообщений. Ожидаемый статус -
- Inheritance
-
- Object
- Controller
- SendSMSController
Constructors
Properties
- endpoint ↔ String
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- request ↔ Request
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- smsRepository → SMSRepository
-
final
Methods
-
call(
Request request) → FutureOr< Response> -
inherited
-
handler(
) → Future< Response> -
Must be implemented
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestAsJson(
) → Future -
Reads request value and parse as json
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited