Class Agent<ReqRaw, ResParsed>
Constructors
constructor
-
Parameters
-
-
-
-
-
transport: Transport<ReqRaw, ResParsed>
-
plugins: Plugin<ReqRaw, ResParsed>[]
Properties
plugins
plugins
: Plugin<ReqRaw, ResParsed>[]
Methods
delete
-
Parameters
Returns Future<Response<ResParsed>>
get
-
Parameters
Returns Future<Response<ResParsed>>
head
-
Parameters
Returns Future<Response<ResParsed>>
patch
-
Parameters
Returns Future<Response<ResParsed>>
post
-
Parameters
Returns Future<Response<ResParsed>>
put
-
Parameters
Returns Future<Response<ResParsed>>
send
-
Parameters
Returns Future<Response<ResParsed>>
setTransport
- setTransport<Req, Res>(transport: Transport<Req, Res>, plugins?: Plugin<Req, Res>[]): Agent<Req, Res>
-
Type parameters
Parameters
-
transport: Transport<Req, Res>
-
Default value plugins: Plugin<Req, Res>[] = []
Returns Agent<Req, Res>
Agent acts as an HTTP client.
An Agent instance uses its transport to send HTTP requests and receive responses.