| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- "use strict";
- // Copyright (c) .NET Foundation. All rights reserved.
- // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
- var __assign = (this && this.__assign) || Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- Object.defineProperty(exports, "__esModule", { value: true });
- /** Represents an HTTP response. */
- var HttpResponse = /** @class */ (function () {
- function HttpResponse(statusCode, statusText, content) {
- this.statusCode = statusCode;
- this.statusText = statusText;
- this.content = content;
- }
- return HttpResponse;
- }());
- exports.HttpResponse = HttpResponse;
- /** Abstraction over an HTTP client.
- *
- * This class provides an abstraction over an HTTP client so that a different implementation can be provided on different platforms.
- */
- var HttpClient = /** @class */ (function () {
- function HttpClient() {
- }
- HttpClient.prototype.get = function (url, options) {
- return this.send(__assign({}, options, { method: "GET", url: url }));
- };
- HttpClient.prototype.post = function (url, options) {
- return this.send(__assign({}, options, { method: "POST", url: url }));
- };
- HttpClient.prototype.delete = function (url, options) {
- return this.send(__assign({}, options, { method: "DELETE", url: url }));
- };
- /** Gets all cookies that apply to the specified URL.
- *
- * @param url The URL that the cookies are valid for.
- * @returns {string} A string containing all the key-value cookie pairs for the specified URL.
- */
- // @ts-ignore
- HttpClient.prototype.getCookieString = function (url) {
- return "";
- };
- return HttpClient;
- }());
- exports.HttpClient = HttpClient;
- //# sourceMappingURL=HttpClient.js.map
|