sendCustomRequest method

Future<Request> sendCustomRequest(
  1. String path,
  2. Map<String, dynamic> payload
)

Implementation

Future<Request> sendCustomRequest(
    String path, Map<String, dynamic> payload) async {
  final Map<String, String> headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer $accessToken',
  };

  final Map<String, dynamic> body = payload;

  await request.post('$fromNumberId$path', headers, body);
  return request;
}