uploadBlob method

Future<Tuple2> uploadBlob(
  1. Uint8List bytes,
  2. String contentType
)

Implementation

Future<Tuple2> uploadBlob(Uint8List bytes, String contentType) async {
  http.Response res = await api.post("com.atproto.repo.uploadBlob",
      headers: {
        "Content-Type": contentType,
        "Authorization": "Bearer ${api.session.accessJwt}"
      },
      body: bytes);
  return Tuple2<int, Map<String, dynamic>>(
      res.statusCode, json.decode(res.body));
}