diff --git a/fetch.bs b/fetch.bs index 9ef6385fb..625f5bd71 100644 --- a/fetch.bs +++ b/fetch.bs @@ -7162,6 +7162,7 @@ interface mixin Body { readonly attribute boolean bodyUsed; [NewObject] Promise<ArrayBuffer> arrayBuffer(); [NewObject] Promise<Blob> blob(); + [NewObject] Promise<Uint8Array> bytes(); [NewObject] Promise<FormData> formData(); [NewObject] Promise<any> json(); [NewObject] Promise<USVString> text(); @@ -7195,6 +7196,9 @@ due course.
requestOrResponse . blob()

Returns a promise fulfilled with requestOrResponse's body as {{Blob}}. +

requestOrResponse . bytes() +

Returns a promise fulfilled with requestOrResponse's body as {{Uint8Array}}. +

requestOrResponse . formData()

Returns a promise fulfilled with requestOrResponse's body as {{FormData}}. @@ -7290,6 +7294,15 @@ and whose {{Blob/type}} attribute is the result of get the MIME type +

+

The bytes() method steps are to return the result +of running consume body with this and the following step given a +byte sequence bytes: return the result of [=ArrayBufferView/create|creating=] a +{{Uint8Array}} from bytes in this's relevant realm. + +

The above method can reject with a {{RangeError}}. +

+

The formData() method steps are to return the result of running consume body with this and the following steps given a