getContentLength method

Future<String?> getContentLength(
  1. AdapterResponse response
)

获取内容长度(兼容方法)

Implementation

Future<String?> getContentLength(AdapterResponse<dynamic> response) async {
  try {
    return response.getHeader(HttpHeaders.contentRangeHeader);
  } catch (e) {
    return null;
  }
}