GetResponse method

  1. @override
Future<IEwsHttpWebResponse> GetResponse()
override
Returns a response from an Internet resource.

Implementation

@override
Future<IEwsHttpWebResponse> GetResponse() async {
  final request = await _InternalGetRequest();
  final HttpClientResponse response = await request.close();
  _httpClient.close();

  if (response.statusCode < 200 || response.statusCode >= 300) {
    throw new WebException(
        WebExceptionStatus.ProtocolError, _request, response);
  }
  return EwsHttpWebResponse(this, response);
}