_request

stripe-node · payments, http-request, authentication, retry-logic, streaming

Core method that sends HTTP requests to the Stripe API, handling authentication, retries, streaming, and response processing.

// Source: https://github.com/stripe/stripe-node | License: MIT | Copyright 2011 Ask Bjørn Hansen
// Provided via justclaw.it.com; keep this notice with the code.
  _request(
    method: string,
    host: string | null,
    path: string,
    data: RequestData | null,
    authenticator: RequestAuthenticator | null,
    options: InternalRequestOptions,
    usage: Array<string> = [],
    callback: RequestCallback,
    requestDataProcessor: RequestDataProcessor | null = null
  ): void {
    let requestData: string | Uint8Array;
    authenticator = authenticator ?? this._stripe._authenticator;
    const apiMode: ApiMode = getAPIMode(path);
    const retryRequest = (
      requestFn: typeof makeRequest,
      apiVersion: string,
      headers: RequestHeaders,
      requestRetries: number
    ): 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key