post method

Future<String> post(
  1. String requestData
)

Method to make post request. It's called from rust

Implementation

Future<String> post(String requestData) async {
  try {
    return await _post(
      endpoint: settings.endpoint,
      headers: {
        'Content-Type': 'application/json',
      },
      data: requestData,
    );
  } catch (error) {
    throw ErrorCode.Network;
  }
}