summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.h')
-rw-r--r--Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.h b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.h
index 4ed881d88f..1738b2ed55 100644
--- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.h
+++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Responses.h
@@ -50,9 +50,9 @@ public:
};
[[nodiscard]] static JS::NonnullGCPtr<Response> create(JS::VM&);
- static ErrorOr<JS::NonnullGCPtr<Response>> aborted_network_error(JS::VM&);
- [[nodiscard]] static JS::NonnullGCPtr<Response> network_error(JS::VM&, String message);
- static ErrorOr<JS::NonnullGCPtr<Response>> appropriate_network_error(JS::VM&, FetchParams const&);
+ [[nodiscard]] static JS::NonnullGCPtr<Response> aborted_network_error(JS::VM&);
+ [[nodiscard]] static JS::NonnullGCPtr<Response> network_error(JS::VM&, Variant<String, StringView> message);
+ [[nodiscard]] static JS::NonnullGCPtr<Response> appropriate_network_error(JS::VM&, FetchParams const&);
virtual ~Response() = default;
@@ -109,7 +109,7 @@ public:
[[nodiscard]] WebIDL::ExceptionOr<JS::NonnullGCPtr<Response>> clone(JS::VM&) const;
// Non-standard
- Optional<String> const& network_error_message() const { return m_network_error_message; }
+ [[nodiscard]] Optional<StringView> network_error_message() const;
protected:
explicit Response(JS::NonnullGCPtr<HeaderList>);
@@ -177,7 +177,7 @@ private:
bool m_has_cross_origin_redirects { false };
// Non-standard
- Optional<String> m_network_error_message;
+ Optional<Variant<String, StringView>> m_network_error_message;
};
// https://fetch.spec.whatwg.org/#concept-filtered-response