source: trip-planner-front/node_modules/@angular/common/esm2015/http/src/response.js@ bdd6491

Last change on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 23.7 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC 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 */
8import { HttpHeaders } from './headers';
9/**
10 * Type enumeration for the different kinds of `HttpEvent`.
11 *
12 * @publicApi
13 */
14export var HttpEventType;
15(function (HttpEventType) {
16 /**
17 * The request was sent out over the wire.
18 */
19 HttpEventType[HttpEventType["Sent"] = 0] = "Sent";
20 /**
21 * An upload progress event was received.
22 */
23 HttpEventType[HttpEventType["UploadProgress"] = 1] = "UploadProgress";
24 /**
25 * The response status code and headers were received.
26 */
27 HttpEventType[HttpEventType["ResponseHeader"] = 2] = "ResponseHeader";
28 /**
29 * A download progress event was received.
30 */
31 HttpEventType[HttpEventType["DownloadProgress"] = 3] = "DownloadProgress";
32 /**
33 * The full response including the body was received.
34 */
35 HttpEventType[HttpEventType["Response"] = 4] = "Response";
36 /**
37 * A custom event from an interceptor or a backend.
38 */
39 HttpEventType[HttpEventType["User"] = 5] = "User";
40})(HttpEventType || (HttpEventType = {}));
41/**
42 * Base class for both `HttpResponse` and `HttpHeaderResponse`.
43 *
44 * @publicApi
45 */
46export class HttpResponseBase {
47 /**
48 * Super-constructor for all responses.
49 *
50 * The single parameter accepted is an initialization hash. Any properties
51 * of the response passed there will override the default values.
52 */
53 constructor(init, defaultStatus = 200 /* Ok */, defaultStatusText = 'OK') {
54 // If the hash has values passed, use them to initialize the response.
55 // Otherwise use the default values.
56 this.headers = init.headers || new HttpHeaders();
57 this.status = init.status !== undefined ? init.status : defaultStatus;
58 this.statusText = init.statusText || defaultStatusText;
59 this.url = init.url || null;
60 // Cache the ok value to avoid defining a getter.
61 this.ok = this.status >= 200 && this.status < 300;
62 }
63}
64/**
65 * A partial HTTP response which only includes the status and header data,
66 * but no response body.
67 *
68 * `HttpHeaderResponse` is a `HttpEvent` available on the response
69 * event stream, only when progress events are requested.
70 *
71 * @publicApi
72 */
73export class HttpHeaderResponse extends HttpResponseBase {
74 /**
75 * Create a new `HttpHeaderResponse` with the given parameters.
76 */
77 constructor(init = {}) {
78 super(init);
79 this.type = HttpEventType.ResponseHeader;
80 }
81 /**
82 * Copy this `HttpHeaderResponse`, overriding its contents with the
83 * given parameter hash.
84 */
85 clone(update = {}) {
86 // Perform a straightforward initialization of the new HttpHeaderResponse,
87 // overriding the current parameters with new ones if given.
88 return new HttpHeaderResponse({
89 headers: update.headers || this.headers,
90 status: update.status !== undefined ? update.status : this.status,
91 statusText: update.statusText || this.statusText,
92 url: update.url || this.url || undefined,
93 });
94 }
95}
96/**
97 * A full HTTP response, including a typed response body (which may be `null`
98 * if one was not returned).
99 *
100 * `HttpResponse` is a `HttpEvent` available on the response event
101 * stream.
102 *
103 * @publicApi
104 */
105export class HttpResponse extends HttpResponseBase {
106 /**
107 * Construct a new `HttpResponse`.
108 */
109 constructor(init = {}) {
110 super(init);
111 this.type = HttpEventType.Response;
112 this.body = init.body !== undefined ? init.body : null;
113 }
114 clone(update = {}) {
115 return new HttpResponse({
116 body: (update.body !== undefined) ? update.body : this.body,
117 headers: update.headers || this.headers,
118 status: (update.status !== undefined) ? update.status : this.status,
119 statusText: update.statusText || this.statusText,
120 url: update.url || this.url || undefined,
121 });
122 }
123}
124/**
125 * A response that represents an error or failure, either from a
126 * non-successful HTTP status, an error while executing the request,
127 * or some other failure which occurred during the parsing of the response.
128 *
129 * Any error returned on the `Observable` response stream will be
130 * wrapped in an `HttpErrorResponse` to provide additional context about
131 * the state of the HTTP layer when the error occurred. The error property
132 * will contain either a wrapped Error object or the error response returned
133 * from the server.
134 *
135 * @publicApi
136 */
137export class HttpErrorResponse extends HttpResponseBase {
138 constructor(init) {
139 // Initialize with a default status of 0 / Unknown Error.
140 super(init, 0, 'Unknown Error');
141 this.name = 'HttpErrorResponse';
142 /**
143 * Errors are never okay, even when the status code is in the 2xx success range.
144 */
145 this.ok = false;
146 // If the response was successful, then this was a parse error. Otherwise, it was
147 // a protocol-level failure of some sort. Either the request failed in transit
148 // or the server returned an unsuccessful status code.
149 if (this.status >= 200 && this.status < 300) {
150 this.message = `Http failure during parsing for ${init.url || '(unknown url)'}`;
151 }
152 else {
153 this.message = `Http failure response for ${init.url || '(unknown url)'}: ${init.status} ${init.statusText}`;
154 }
155 this.error = init.error || null;
156 }
157}
158//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzcG9uc2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb21tb24vaHR0cC9zcmMvcmVzcG9uc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFDLFdBQVcsRUFBQyxNQUFNLFdBQVcsQ0FBQztBQUV0Qzs7OztHQUlHO0FBQ0gsTUFBTSxDQUFOLElBQVksYUE4Qlg7QUE5QkQsV0FBWSxhQUFhO0lBQ3ZCOztPQUVHO0lBQ0gsaURBQUksQ0FBQTtJQUVKOztPQUVHO0lBQ0gscUVBQWMsQ0FBQTtJQUVkOztPQUVHO0lBQ0gscUVBQWMsQ0FBQTtJQUVkOztPQUVHO0lBQ0gseUVBQWdCLENBQUE7SUFFaEI7O09BRUc7SUFDSCx5REFBUSxDQUFBO0lBRVI7O09BRUc7SUFDSCxpREFBSSxDQUFBO0FBQ04sQ0FBQyxFQTlCVyxhQUFhLEtBQWIsYUFBYSxRQThCeEI7QUFnR0Q7Ozs7R0FJRztBQUNILE1BQU0sT0FBZ0IsZ0JBQWdCO0lBa0NwQzs7Ozs7T0FLRztJQUNILFlBQ0ksSUFLQyxFQUNELDRCQUF5QyxFQUFFLG9CQUE0QixJQUFJO1FBQzdFLHNFQ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