source: imaps-frontend/node_modules/undici-types/api.d.ts

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.4 KB
Line 
1import { URL, UrlObject } from 'url'
2import { Duplex } from 'stream'
3import Dispatcher from './dispatcher'
4
5export {
6 request,
7 stream,
8 pipeline,
9 connect,
10 upgrade,
11}
12
13/** Performs an HTTP request. */
14declare function request(
15 url: string | URL | UrlObject,
16 options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
17): Promise<Dispatcher.ResponseData>;
18
19/** A faster version of `request`. */
20declare function stream(
21 url: string | URL | UrlObject,
22 options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path'>,
23 factory: Dispatcher.StreamFactory
24): Promise<Dispatcher.StreamData>;
25
26/** For easy use with `stream.pipeline`. */
27declare function pipeline(
28 url: string | URL | UrlObject,
29 options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions, 'origin' | 'path'>,
30 handler: Dispatcher.PipelineHandler
31): Duplex;
32
33/** Starts two-way communications with the requested resource. */
34declare function connect(
35 url: string | URL | UrlObject,
36 options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions, 'origin' | 'path'>
37): Promise<Dispatcher.ConnectData>;
38
39/** Upgrade to a different protocol. */
40declare function upgrade(
41 url: string | URL | UrlObject,
42 options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.UpgradeOptions, 'origin' | 'path'>
43): Promise<Dispatcher.UpgradeData>;
Note: See TracBrowser for help on using the repository browser.