httpUtil.d.ts 768 B

123456789101112131415161718
  1. /**
  2. * @license
  3. * Copyright 2023 Google Inc.
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /// <reference types="node" />
  7. /// <reference types="node" />
  8. import * as http from 'http';
  9. import { URL } from 'url';
  10. export declare function headHttpRequest(url: URL): Promise<boolean>;
  11. export declare function httpRequest(url: URL, method: string, response: (x: http.IncomingMessage) => void, keepAlive?: boolean): http.ClientRequest;
  12. /**
  13. * @internal
  14. */
  15. export declare function downloadFile(url: URL, destinationPath: string, progressCallback?: (downloadedBytes: number, totalBytes: number) => void): Promise<void>;
  16. export declare function getJSON(url: URL): Promise<unknown>;
  17. export declare function getText(url: URL): Promise<string>;
  18. //# sourceMappingURL=httpUtil.d.ts.map