MCPcopy Create free account
hub / github.com/angular/angular / warningOptionsMessage

Function warningOptionsMessage

packages/common/http/src/fetch.ts:448–457  ·  view source on GitHub ↗
(req: HttpRequest<any>)

Source from the content-addressed store, hash-verified

446function noop(): void {}
447
448function warningOptionsMessage(req: HttpRequest<any>) {
449 if (req.credentials && req.withCredentials) {
450 console.warn(
451 formatRuntimeError(
452 RuntimeErrorCode.WITH_CREDENTIALS_OVERRIDES_EXPLICIT_CREDENTIALS,
453 `Angular detected that a \`HttpClient\` request has both \`withCredentials: true\` and \`credentials: '${req.credentials}'\` options. The \`withCredentials\` option is overriding the explicit \`credentials\` setting to 'include'. Consider removing \`withCredentials\` and using \`credentials: '${req.credentials}'\` directly for clarity.`,
454 ),
455 );
456 }
457}
458
459/**
460 * Zone.js treats a rejected promise that has not yet been awaited

Callers 1

createRequestInitMethod · 0.85

Calls 2

formatRuntimeErrorFunction · 0.85
warnMethod · 0.65

Tested by

no test coverage detected