UNPKG

2.12 kBJavaScriptView Raw
1"use strict";
2// Copyright 2018 Google LLC
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15 if (k2 === undefined) k2 = k;
16 var desc = Object.getOwnPropertyDescriptor(m, k);
17 if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
18 desc = { enumerable: true, get: function() { return m[k]; } };
19 }
20 Object.defineProperty(o, k2, desc);
21}) : (function(o, m, k, k2) {
22 if (k2 === undefined) k2 = k;
23 o[k2] = m[k];
24}));
25var __exportStar = (this && this.__exportStar) || function(m, exports) {
26 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27};
28Object.defineProperty(exports, "__esModule", { value: true });
29exports.instance = exports.Gaxios = exports.GaxiosError = void 0;
30exports.request = request;
31const gaxios_1 = require("./gaxios");
32Object.defineProperty(exports, "Gaxios", { enumerable: true, get: function () { return gaxios_1.Gaxios; } });
33var common_1 = require("./common");
34Object.defineProperty(exports, "GaxiosError", { enumerable: true, get: function () { return common_1.GaxiosError; } });
35__exportStar(require("./interceptor"), exports);
36/**
37 * The default instance used when the `request` method is directly
38 * invoked.
39 */
40exports.instance = new gaxios_1.Gaxios();
41/**
42 * Make an HTTP request using the given options.
43 * @param opts Options for the request
44 */
45async function request(opts) {
46 return exports.instance.request(opts);
47}
48//# sourceMappingURL=index.js.map
\No newline at end of file