summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Loader/ResourceLoader.h
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-04-03 15:11:36 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-03 16:34:34 +0200
commit000ef96613466427a4a84103778e6f0a423e2845 (patch)
tree68e64ce867ba1506f5ae7f62b1f7670a0589b42c /Userland/Libraries/LibWeb/Loader/ResourceLoader.h
parent975b209b9bc2b495410caea3117e593af1daea20 (diff)
downloadserenity-000ef96613466427a4a84103778e6f0a423e2845.zip
LibWeb: Pass optional status code to ResourceLoader callbacks
This is needed for XMLHttpRequest, and will certainly be useful for other things, too.
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader/ResourceLoader.h')
-rw-r--r--Userland/Libraries/LibWeb/Loader/ResourceLoader.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.h b/Userland/Libraries/LibWeb/Loader/ResourceLoader.h
index ad23dd8da1..02fda51250 100644
--- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.h
+++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.h
@@ -44,9 +44,9 @@ public:
RefPtr<Resource> load_resource(Resource::Type, const LoadRequest&);
- void load(const LoadRequest&, Function<void(ReadonlyBytes, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers)> success_callback, Function<void(const String&)> error_callback = nullptr);
- void load(const URL&, Function<void(ReadonlyBytes, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers)> success_callback, Function<void(const String&)> error_callback = nullptr);
- void load_sync(const URL&, Function<void(ReadonlyBytes, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers)> success_callback, Function<void(const String&)> error_callback = nullptr);
+ void load(const LoadRequest&, Function<void(ReadonlyBytes, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers, Optional<u32> status_code)> success_callback, Function<void(const String&, Optional<u32> status_code)> error_callback = nullptr);
+ void load(const URL&, Function<void(ReadonlyBytes, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers, Optional<u32> status_code)> success_callback, Function<void(const String&, Optional<u32> status_code)> error_callback = nullptr);
+ void load_sync(const URL&, Function<void(ReadonlyBytes, const HashMap<String, String, CaseInsensitiveStringTraits>& response_headers, Optional<u32> status_code)> success_callback, Function<void(const String&, Optional<u32> status_code)> error_callback = nullptr);
Function<void()> on_load_counter_change;