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:
parent
afe2563e2b
commit
5ad6283331
5 changed files with 235 additions and 0 deletions
12
Userland/Libraries/LibWeb/Fetch/Body.idl
Normal file
12
Userland/Libraries/LibWeb/Fetch/Body.idl
Normal 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();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue