request<T> method

Future<HttpData<T>> request<T>(
  1. dynamic handleHttpData(
    1. HttpData data,
    2. RequestInfo requestInfo
    ),
  2. {bool isSetError = true}
)

---------------------------------------------通用请求方法------------------------------------------------------

Implementation

Future<HttpData<T>> request<T>(
    handleHttpData(HttpData data, RequestInfo requestInfo),
    {bool isSetError = true}
) async{

  doOther();
  RequestInfo requestInfo = getRequestInfo();
  HttpData<T> httpData = await doRequest<T>(requestInfo);

  _handleHttpData<T>(
      handleHttpData,
      httpData,
      requestInfo,
      isSetError
  );
  return httpData;
}