send method

发布评论

  • data 评论信息

返回执行结果

Implementation

Future<ResponseResult> send(CommentPost data) async {
  try {
    var rsp = await Request.post(
      'comment',
      data: {
        ...data.toJson(),
        'apiKey': token,
      },
    );

    return ResponseResult.from(rsp);
  } catch (e) {
    return Future.error(e);
  }
}