diff --git a/fetch.bs b/fetch.bs index c4c2ff47c..a7419fc1b 100644 --- a/fetch.bs +++ b/fetch.bs @@ -1464,11 +1464,12 @@ must be an algorithm accepting an exception.
To fully read a body body, given an algorithm -processBody, an algorithm processBodyError, and an optional null, -parallel queue, or global object taskDestination (default -null), run these steps. processBody must be an algorithm accepting a -byte sequence. processBodyError must be an algorithm accepting no arguments. +
To fully read a body body, given an +optional number maxByteLength, an algorithm processBody, an +algorithm processBodyError, and an optional null, parallel queue, or +global object taskDestination (default null), run these steps. +processBody must be an algorithm accepting a byte sequence. +processBodyError must be an algorithm accepting no arguments.
If taskDestination is null, then set taskDestination to the result of @@ -1486,7 +1487,7 @@ null), run these steps. processBody must be an algorithm accepting a errorSteps with that exception and return.
Read all bytes from - reader, given successSteps and errorSteps. + reader, given maxByteLength, successSteps and errorSteps.
Formats you would not want a network layer to be dependent upon, such as @@ -6935,19 +6940,19 @@ returns failure or a MIME type.
requestOrResponse . bodyUsed
Returns whether requestOrResponse's body has been read from. -
requestOrResponse . arrayBuffer()
+ requestOrResponse . arrayBuffer(options)
Returns a promise fulfilled with requestOrResponse's body as {{ArrayBuffer}}. -
requestOrResponse . blob()
+ requestOrResponse . blob(options)
Returns a promise fulfilled with requestOrResponse's body as {{Blob}}. -
requestOrResponse . formData()
+ requestOrResponse . formData(options)
Returns a promise fulfilled with requestOrResponse's body as {{FormData}}. -
requestOrResponse . json()
+ requestOrResponse . json(options)
Returns a promise fulfilled with requestOrResponse's body parsed as JSON. -
requestOrResponse . text()
+ requestOrResponse . text(options)
Returns a promise fulfilled with requestOrResponse's body as string. @@ -6967,9 +6972,10 @@ returns failure or a MIME type.
The consume body -algorithm, given an object that includes {{Body}} object and an algorithm that takes a -byte sequence and returns a JavaScript value or throws an exception -convertBytesToJSValue, runs these steps: +algorithm, given an object that includes {{Body}} object, a +{{BodyConsumeOptions}} options and an algorithm that takes a byte sequence and +returns a JavaScript value or throws an exception convertBytesToJSValue, runs these +steps:
If object is unusable, then return a promise rejected with @@ -6989,32 +6995,32 @@ algorithm, given an object that includes {{Body}} object and an algor with an empty byte sequence.
Otherwise, fully read object's body given - successSteps, errorSteps, and object's - relevant global object. + options's {{BodyConsumeOptions/maxByteLength}}, successSteps, errorSteps, + and object's relevant global object.
Return promise.
The arrayBuffer()
method steps are to return the result
-of running consume body with this and the following step given a
-byte sequence bytes: return a new {{ArrayBuffer}} whose contents are
+
The arrayBuffer(options)
method steps are to return the result
+of running consume body with this, options and the following step
+given a byte sequence bytes: return a new {{ArrayBuffer}} whose contents are
bytes.
The above method can reject with a {{RangeError}}.
The blob()
method steps are to return the result
-of running consume body with this and the following step given a
-byte sequence bytes: return a {{Blob}} whose contents are bytes
-and whose {{Blob/type}} attribute is this's MIME type.
+
The blob(options)
method steps are to return the result
+of running consume body with this, options and the following step
+given a byte sequence bytes: return a {{Blob}} whose contents are
+bytes and whose {{Blob/type}} attribute is this's MIME type.
The formData()
method steps are to return the result of
-running consume body with this and the following step given a
+
The formData(options)
method steps are to return the result of
+running consume body with this, options and the following step given a
byte sequence bytes: switch on this's MIME type's
essence and run the corresponding steps:
@@ -7075,15 +7081,16 @@ running consume body with this and the following step giv
The json()
method steps are to return the result
-of running consume body with this and parse JSON from bytes.
+
The json(options)
method steps are to return the result
+of running consume body with this, options and
+parse JSON from bytes.
The above method can reject with a {{SyntaxError}}.
The text()
method steps are to return the result
-of running consume body with this and UTF-8 decode.
+
The text(options)
method steps are to return the result
+of running consume body with this, options and UTF-8 decode.