send method

Future<void> send(
  1. dynamic message
)

Implementation

Future<void> send(message) async {
    var res = await http.post(
        Uri.parse(client.clientConfig.apiUrl + '/channels/$id/messages'),
        headers: client._authHeaders,
        body: jsonEncode({
            'nonce': DateTime.now().millisecondsSinceEpoch.toString(),
            'content': message
        })
    );
    if (res.statusCode != 200) throw res.body;
    return null;
}