status property

int get status

Retrieves the HTTP status code from the last response.

To learn more, see learn.microsoft.com/windows/win32/WinHttp/iwinhttprequest-status.

Implementation

int get status {
  final status = adaptiveCalloc<Int32>();
  final hr$ = HRESULT(_get_StatusFn(ptr, status));
  if (hr$.isError) {
    free(status);
    throw WindowsException(hr$);
  }
  final result$ = status.value;
  free(status);
  return result$;
}