NetworkResponse.h 501 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. * Copyright (c) 2022, the SerenityOS developers.
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #pragma once
  8. #include <AK/ByteBuffer.h>
  9. #include <AK/RefCounted.h>
  10. namespace Core {
  11. class NetworkResponse : public RefCounted<NetworkResponse> {
  12. public:
  13. virtual ~NetworkResponse() = default;
  14. bool is_error() const { return m_error; }
  15. protected:
  16. explicit NetworkResponse() = default;
  17. bool m_error { false };
  18. };
  19. }