Optionalbody: BodyInit | nullOptionalinit: ResponseInitThe json() static method of the Response interface returns a Response that contains the provided JSON data as body, and a Content-Type header which is set to application/json. The response status, status message, and additional headers can also be set.
Optionalinit: ResponseInit
The
error()static method of the Response interface returns a new Response object associated with a network error.MDN Reference