mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:48:14 +00:00
LibWeb: Add an alias for FetchAlgorithm's consume-body callback argument
This will make it more convenient in places where the Variant would need to be re-typed outside of this class.
This commit is contained in:
parent
567b8da1e0
commit
cb32bb3502
1 changed files with 3 additions and 1 deletions
|
@ -20,12 +20,14 @@ class FetchAlgorithms : public JS::Cell {
|
|||
|
||||
public:
|
||||
struct ConsumeBodyFailureTag { };
|
||||
using BodyBytes = Variant<Empty, ConsumeBodyFailureTag, ByteBuffer>;
|
||||
|
||||
using ProcessRequestBodyChunkLengthFunction = JS::SafeFunction<void(u64)>;
|
||||
using ProcessRequestEndOfBodyFunction = JS::SafeFunction<void()>;
|
||||
using ProcessEarlyHintsResponseFunction = JS::SafeFunction<void(JS::NonnullGCPtr<Infrastructure::Response>)>;
|
||||
using ProcessResponseFunction = JS::SafeFunction<void(JS::NonnullGCPtr<Infrastructure::Response>)>;
|
||||
using ProcessResponseEndOfBodyFunction = JS::SafeFunction<void(JS::NonnullGCPtr<Infrastructure::Response>)>;
|
||||
using ProcessResponseConsumeBodyFunction = JS::SafeFunction<void(JS::NonnullGCPtr<Infrastructure::Response>, Variant<Empty, ConsumeBodyFailureTag, ByteBuffer>)>;
|
||||
using ProcessResponseConsumeBodyFunction = JS::SafeFunction<void(JS::NonnullGCPtr<Infrastructure::Response>, BodyBytes)>;
|
||||
|
||||
struct Input {
|
||||
Optional<ProcessRequestBodyChunkLengthFunction> process_request_body_chunk_length;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue