mirror of
https://github.com/servo/servo.git
synced 2025-08-14 09:55:35 +01:00
Implement the Request API for the Fetch API.
This commit adds new files related to implementing the [Request API](https://fetch.spec.whatwg.org/#request-class). This commit also changes the expected web platform tests results. It also modifies the following files: components/net_traits/request.rs HeapSizeOf is implemented in net_traits/request so that dom::request can be used as a wrapper around net_traits::request::Request. components/script/dom/headers.rs Several methods are added to Headers so that request can access and modify some of the headers fields.
This commit is contained in:
parent
b7facf41cb
commit
fabe2b8f7e
13 changed files with 1070 additions and 359 deletions
19
components/script/dom/webidls/Body.webidl
Normal file
19
components/script/dom/webidls/Body.webidl
Normal file
|
@ -0,0 +1,19 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://fetch.spec.whatwg.org/#body
|
||||
|
||||
[NoInterfaceObject,
|
||||
Exposed=(Window,Worker)]
|
||||
|
||||
interface Body {
|
||||
readonly attribute boolean bodyUsed;
|
||||
|
||||
// Servo does not support Promise at this moment.
|
||||
// [NewObject] Promise<ArrayBuffer> arrayBuffer();
|
||||
// [NewObject] Promise<Blob> blob();
|
||||
// [NewObject] Promise<FormData> formData();
|
||||
// [NewObject] Promise<JSON> json();
|
||||
// [NewObject] Promise<USVString> text();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue