postWithoutAuth method

Future<CloudBaseResponse> postWithoutAuth(
  1. String action,
  2. Map<String, dynamic> data
)

发送请求,不携带 accessToken,使用于登录

Implementation

Future<CloudBaseResponse> postWithoutAuth(
    String action, Map<String, dynamic> data) async {
  data.addAll({
    'action': action,
    'env': _core.config.envId,
    'sdk_version': _VERSION,
    'dataVersion': _DATA_VERSION
  });

  data = await Sign.signData(_core, data);
  final Response response = await _tracePost(_TCB_WEB_URL, data);
  return CloudBaseResponse.fromMap({
    'code': response.data['code'],
    'data': response.data,
    'message': response.data['message'],
    'requestId': response.data['requestId']
  });
}