1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00

LibWeb: Add definitions from '2.2.4. Bodies' in the Fetch spec

...at least the ones that don't require an implementation of the Streams
spec :^)
This commit is contained in:
Linus Groh 2022-07-12 18:04:24 +01:00
parent 1694279dd8
commit f507f68d4a
4 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,23 @@
/*
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Fetch/Infrastructure/HTTP/Bodies.h>
namespace Web::Fetch {
Body::Body(ReadableStreamDummy stream)
: m_stream(stream)
{
}
Body::Body(ReadableStreamDummy stream, SourceType source, Optional<u64> length)
: m_stream(stream)
, m_source(move(source))
, m_length(move(length))
{
}
}