Project

General

Profile

1
/**
2
 * @license
3
 * Copyright Google Inc. All Rights Reserved.
4
 *
5
 * Use of this source code is governed by an MIT-style license that can be
6
 * found in the LICENSE file at https://angular.io/license
7
 */
8
import { ModuleWithProviders } from '@angular/core';
9
import { HttpBackend, HttpHandler } from './backend';
10
import { HttpInterceptor } from './interceptor';
11
/**
12
 * Constructs an `HttpHandler` that applies a bunch of `HttpInterceptor`s
13
 * to a request before passing it to the given `HttpBackend`.
14
 *
15
 * Meant to be used as a factory function within `HttpClientModule`.
16
 *
17
 * @experimental
18
 */
19
export declare function interceptingHandler(backend: HttpBackend, interceptors?: HttpInterceptor[] | null): HttpHandler;
20
/**
21
 * Factory function that determines where to store JSONP callbacks.
22
 *
23
 * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist
24
 * in test environments. In that case, callbacks are stored on an anonymous object instead.
25
 *
26
 * @experimental
27
 */
28
export declare function jsonpCallbackContext(): Object;
29
/**
30
 * `NgModule` which adds XSRF protection support to outgoing requests.
31
 *
32
 * Provided the server supports a cookie-based XSRF protection system, this
33
 * module can be used directly to configure XSRF protection with the correct
34
 * cookie and header names.
35
 *
36
 * If no such names are provided, the default is to use `X-XSRF-TOKEN` for
37
 * the header name and `XSRF-TOKEN` for the cookie name.
38
 *
39
 * @experimental
40
 */
41
export declare class HttpClientXsrfModule {
42
    /**
43
     * Disable the default XSRF protection.
44
     */
45
    static disable(): ModuleWithProviders;
46
    /**
47
     * Configure XSRF protection to use the given cookie name or header name,
48
     * or the default names (as described above) if not provided.
49
     */
50
    static withOptions(options?: {
51
        cookieName?: string;
52
        headerName?: string;
53
    }): ModuleWithProviders;
54
}
55
/**
56
 * `NgModule` which provides the `HttpClient` and associated services.
57
 *
58
 * Interceptors can be added to the chain behind `HttpClient` by binding them
59
 * to the multiprovider for `HTTP_INTERCEPTORS`.
60
 *
61
 * @experimental
62
 */
63
export declare class HttpClientModule {
64
}
65
/**
66
 * `NgModule` which enables JSONP support in `HttpClient`.
67
 *
68
 * Without this module, Jsonp requests will reach the backend
69
 * with method JSONP, where they'll be rejected.
70
 *
71
 * @experimental
72
 */
73
export declare class HttpClientJsonpModule {
74
}
(6-6/11)