How to use the gaxios.Gaxios function in gaxios

To help you get started, we’ve selected a few gaxios examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github faastjs / faast.js / src / google / google-faast.ts View on Github external
import { Mutable } from "../types";
import {
    FunctionCallSerialized,
    FunctionReturnSerialized,
    WrapperOptions
} from "../wrapper";
import { publishPubSub, receiveMessages } from "./google-queue";
import { shouldRetryRequest } from "./google-shared";
import * as googleTrampolineHttps from "./google-trampoline-https";
import * as googleTrampolineQueue from "./google-trampoline-queue";

import CloudFunctions = cloudfunctions_v1;
import PubSubApi = pubsub_v1;
import CloudBilling = cloudbilling_v1;

const gaxios = new Gaxios({
    retryConfig: {
        retry: 3,
        noResponseRetries: 3,
        shouldRetry: shouldRetryRequest(log.retry)
    }
});

/**
 * Valid Google Cloud
 * {@link https://cloud.google.com/compute/docs/regions-zones/ | regions}.
 * Only some of these [regions have Cloud Functions](https://cloud.google.com/functions/docs/locations).
 * @public
 */
export type GoogleRegion =
    | "asia-east1"
    | "asia-east2"

gaxios

A simple common HTTP client specifically for Google APIs and services.

Apache-2.0
Latest version published 9 days ago

Package Health Score

91 / 100
Full package analysis

Popular gaxios functions