mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
LibWeb/Fetch: Implement Header's "extract a length" function
Required by XHR's reliance on Fetch.
This commit is contained in:
parent
ccdb1bcc4e
commit
cfbd0bbe0a
2 changed files with 45 additions and 0 deletions
|
@ -51,6 +51,14 @@ public:
|
|||
[[nodiscard]] ErrorOr<void> set(Header);
|
||||
[[nodiscard]] ErrorOr<void> combine(Header);
|
||||
[[nodiscard]] ErrorOr<Vector<Header>> sort_and_combine() const;
|
||||
|
||||
struct ExtractLengthFailure {
|
||||
};
|
||||
|
||||
using ExtractLengthResult = Variant<u64, ExtractLengthFailure, Empty>;
|
||||
|
||||
[[nodiscard]] ErrorOr<ExtractLengthResult> extract_length() const;
|
||||
|
||||
[[nodiscard]] ErrorOr<Optional<MimeSniff::MimeType>> extract_mime_type() const;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue