1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:07:46 +00:00

LibWeb: Implement '5.3. Body mixin' from the Fetch API :^)

This will be used to share functionality between Request and Response.
This commit is contained in:
Linus Groh 2022-09-25 19:30:24 +01:00
parent afe2563e2b
commit 5ad6283331
5 changed files with 235 additions and 0 deletions

View file

@ -0,0 +1,12 @@
#import <Streams/ReadableStream.idl>
// https://fetch.spec.whatwg.org/#body
interface mixin Body {
readonly attribute ReadableStream? body;
readonly attribute boolean bodyUsed;
[NewObject] Promise<ArrayBuffer> arrayBuffer();
[NewObject] Promise<Blob> blob();
[NewObject] Promise<FormData> formData();
[NewObject] Promise<any> json();
[NewObject] Promise<USVString> text();
};