mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-23 19:00:59 +00:00
LibWeb: Pass optional status code to ResourceLoader callbacks
This is needed for XMLHttpRequest, and will certainly be useful for other things, too.
This commit is contained in:
parent
975b209b9b
commit
000ef96613
Notes:
sideshowbarker
2024-07-18 20:52:01 +09:00
Author: https://github.com/linusg
Commit: 000ef96613
Pull-request: https://github.com/SerenityOS/serenity/pull/6090
8 changed files with 42 additions and 39 deletions
|
@ -77,8 +77,8 @@ public:
|
|||
|
||||
void for_each_client(Function<void(ResourceClient&)>);
|
||||
|
||||
void did_load(Badge<ResourceLoader>, ReadonlyBytes data, const HashMap<String, String, CaseInsensitiveStringTraits>& headers);
|
||||
void did_fail(Badge<ResourceLoader>, const String& error);
|
||||
void did_load(Badge<ResourceLoader>, ReadonlyBytes data, const HashMap<String, String, CaseInsensitiveStringTraits>& headers, Optional<u32> status_code);
|
||||
void did_fail(Badge<ResourceLoader>, const String& error, Optional<u32> status_code);
|
||||
|
||||
protected:
|
||||
explicit Resource(Type, const LoadRequest&);
|
||||
|
@ -93,6 +93,7 @@ private:
|
|||
String m_encoding;
|
||||
String m_mime_type;
|
||||
HashMap<String, String, CaseInsensitiveStringTraits> m_response_headers;
|
||||
Optional<u32> m_status_code;
|
||||
HashTable<ResourceClient*> m_clients;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue