5 lines
12 KiB
JSON
5 lines
12 KiB
JSON
{
|
|
"id": "api/common/http/HttpClientXsrfModule",
|
|
"title": "HttpClientXsrfModule",
|
|
"contents": "\n\n<article>\n <div class=\"breadcrumb-container\">\n <div class=\"breadcrumb\">\n <script type=\"application/ld+json\">\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io//api\", \"name\": \"API\" } },\n { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/api/common\", \"name\": \"@angular/common\" } },\n { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.io/api/common/http\", \"name\": \"@angular/common/http\" } },\n { \"@type\": \"ListItem\", \"position\": 4, \"item\": { \"@id\": \"https://angular.io/api/common/http/HttpClientXsrfModule\", \"name\": \"HttpClientXsrfModule\" } }\n ]\n }\n </script>\n <a href=\"/api\">API</a> > <a href=\"api/common\">@angular/common</a> > <a href=\"api/common/http\">@angular/common/http</a>\n </div>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/common/http/src/module.ts?message=docs(common)%3A%20describe%20your%20change...#L77-L132\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/src/module.ts#L77-L132\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n \n <header class=\"api-header\">\n <h1 id=\"httpclientxsrfmodule\">HttpClientXsrfModule<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/http/HttpClientXsrfModule#httpclientxsrfmodule\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label ngmodule\">ngmodule</label>\n \n \n \n </header>\n \n <aio-toc class=\"embedded\"></aio-toc>\n\n <div class=\"api-body\">\n \n <section class=\"short-description\">\n <p>Configures XSRF protection support for outgoing requests.</p>\n\n <p><a href=\"api/common/http/HttpClientXsrfModule#description\">See more...</a></p>\n </section>\n \n \n \n <section class=\"ngmodule-overview\">\n<code-example language=\"ts\" hidecopy=\"true\">\nclass <a href=\"api/common/http/HttpClientXsrfModule\" class=\"code-anchor\">HttpClientXsrfModule</a> {\n <a class=\"code-anchor\" href=\"api/common/http/HttpClientXsrfModule#disable\">static <span class=\"member-name\">disable</span>(): ModuleWithProviders<HttpClientXsrfModule></a>\n <a class=\"code-anchor\" href=\"api/common/http/HttpClientXsrfModule#withOptions\">static <span class=\"member-name\">withOptions</span>(options: { cookieName?: string; headerName?: string; } = {}): ModuleWithProviders<HttpClientXsrfModule></a>\n}\n</code-example>\n\n \n \n\n</section>\n\n\n \n\n \n \n \n<section class=\"description\">\n <h2 id=\"description\">Description<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/http/HttpClientXsrfModule#description\"><i class=\"material-icons\">link</i></a></h2>\n <p>For a server that supports a cookie-based XSRF protection system,\nuse directly to configure XSRF protection with the correct\ncookie and header names.</p>\n<p>If no names are supplied, the default cookie name is <code>XSRF-TOKEN</code>\nand the default header name is <code>X-XSRF-TOKEN</code>.</p>\n\n \n</section>\n\n \n\n \n\n<section class=\"static-methods\">\n <h2 id=\"static-methods\">Static methods<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/http/HttpClientXsrfModule#static-methods\"><i class=\"material-icons\">link</i></a></h2>\n \n <a id=\"disable\"></a>\n<table class=\"is-full-width method-table static-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"disable\">\n disable()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/http/HttpClientXsrfModule#disable\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/common/http/src/module.ts?message=docs(common)%3A%20describe%20your%20change...#L100-L110\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/src/module.ts#L100-L110\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Disable the default XSRF protection.</p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><a href=\"api/upgrade/static\" class=\"code-anchor\">static</a> <span class=\"member-name\">disable</span>(): ModuleWithProviders<HttpClientXsrfModule></code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters\">Parameters</h6>\n <p>There are no parameters.</p>\n\n \n <h6 class=\"no-anchor\" id=\"returns\">Returns</h6>\n <p><code><a href=\"api/core/ModuleWithProviders\" class=\"code-anchor\">ModuleWithProviders</a><<a href=\"api/common/http/HttpClientXsrfModule\" class=\"code-anchor\">HttpClientXsrfModule</a>></code></p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n \n </tbody>\n</table>\n\n \n <a id=\"withOptions\"></a>\n<table class=\"is-full-width method-table static-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"withoptions\">\n withOptions()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/http/HttpClientXsrfModule#withoptions\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/common/http/src/module.ts?message=docs(common)%3A%20describe%20your%20change...#L111-L131\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/src/module.ts#L111-L131\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Configure XSRF protection.</p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><a href=\"api/upgrade/static\" class=\"code-anchor\">static</a> <span class=\"member-name\">withOptions</span>(options: { cookieName?: string; headerName?: string; } = {}): ModuleWithProviders<HttpClientXsrfModule></code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-1\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table static-method-overload-parameters\">\n <tbody>\n \n <tr class=\"static-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>options</code>\n </td>\n <td class=\"param-type\"><code>object</code></td>\n <td class=\"param-description\">\n <p>An object that can specify either or both\ncookie name or header name.</p>\n<ul>\n<li>Cookie name default is <code>XSRF-TOKEN</code>.</li>\n<li>Header name default is <code>X-XSRF-TOKEN</code>.\n</li>\n</ul>\n<p> Optional. Default is <code>{}</code>.</p>\n\n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-1\">Returns</h6>\n <p><code><a href=\"api/core/ModuleWithProviders\" class=\"code-anchor\">ModuleWithProviders</a><<a href=\"api/common/http/HttpClientXsrfModule\" class=\"code-anchor\">HttpClientXsrfModule</a>></code></p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n \n </tbody>\n</table>\n\n \n</section>\n\n \n\n \n\n\n \n\n\n \n \n<section class=\"providers\">\n <h2 id=\"providers\">Providers<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/http/HttpClientXsrfModule#providers\"><i class=\"material-icons\">link</i></a></h2>\n <table class=\"is-full-width list-table property-table\">\n <thead>\n <tr>\n <th>Provider</th>\n </tr>\n </thead>\n <tbody>\n \n <tr>\n <td>\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box\">\n HttpXsrfInterceptor\n </code-example>\n </td>\n </tr>\n \n <tr>\n <td>\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box\">\n { provide: <a href=\"api/common/http/HTTP_INTERCEPTORS\" class=\"code-anchor\">HTTP_INTERCEPTORS</a>, useExisting: HttpXsrfInterceptor, multi: true }\n </code-example>\n </td>\n </tr>\n \n <tr>\n <td>\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box\">\n { provide: <a href=\"api/common/http/HttpXsrfTokenExtractor\" class=\"code-anchor\">HttpXsrfTokenExtractor</a>, useClass: HttpXsrfCookieExtractor }\n </code-example>\n </td>\n </tr>\n \n <tr>\n <td>\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box\">\n { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' }\n </code-example>\n </td>\n </tr>\n \n <tr>\n <td>\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box\">\n { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' }\n </code-example>\n </td>\n </tr>\n \n </tbody>\n </table>\n </section>\n\n \n\n \n \n\n\n \n\n\n </div>\n</article>\n\n<!-- links to this doc:\n - api/common/http\n - guide/http\n-->\n<!-- links from this doc:\n - /api\n - api/common\n - api/common/http\n - api/common/http/HTTP_INTERCEPTORS\n - api/common/http/HttpClientXsrfModule#description\n - api/common/http/HttpClientXsrfModule#disable\n - api/common/http/HttpClientXsrfModule#httpclientxsrfmodule\n - api/common/http/HttpClientXsrfModule#providers\n - api/common/http/HttpClientXsrfModule#static-methods\n - api/common/http/HttpClientXsrfModule#withOptions\n - api/common/http/HttpClientXsrfModule#withoptions\n - api/common/http/HttpXsrfTokenExtractor\n - api/core/ModuleWithProviders\n - api/upgrade/static\n - https://github.com/angular/angular/edit/master/packages/common/http/src/module.ts?message=docs(common)%3A%20describe%20your%20change...#L100-L110\n - https://github.com/angular/angular/edit/master/packages/common/http/src/module.ts?message=docs(common)%3A%20describe%20your%20change...#L111-L131\n - https://github.com/angular/angular/edit/master/packages/common/http/src/module.ts?message=docs(common)%3A%20describe%20your%20change...#L77-L132\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/src/module.ts#L100-L110\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/src/module.ts#L111-L131\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/src/module.ts#L77-L132\n-->"
|
|
} |