RequestInit.credentials - Web documentation
property RequestInit.credentials

A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.

Type