forward method

Future<Message> forward(
  1. String id,
  2. MessageForwardOptions options
)

Implementation

Future<Message> forward(String id, MessageForwardOptions options) async {
  final url = Uri.parse('${baseUrl}api/messages/$id/forward');
  final response = await client.post(url, body: jsonEncode(options));

  if (response.statusCode != 200) {
    throw MailosaurError(response);
  }

  return Message.fromJson(jsonDecode(response.body));
}