index.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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.
  14. var __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. }));
  25. var __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. };
  28. Object.defineProperty(exports, "__esModule", { value: true });
  29. exports.instance = exports.Gaxios = exports.GaxiosError = void 0;
  30. exports.request = request;
  31. const gaxios_1 = require("./gaxios");
  32. Object.defineProperty(exports, "Gaxios", { enumerable: true, get: function () { return gaxios_1.Gaxios; } });
  33. var common_1 = require("./common");
  34. Object.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. */
  40. exports.instance = new gaxios_1.Gaxios();
  41. /**
  42. * Make an HTTP request using the given options.
  43. * @param opts Options for the request
  44. */
  45. async function request(opts) {
  46. return exports.instance.request(opts);
  47. }
  48. //# sourceMappingURL=index.js.map