Latest
Search
K
Links
Comment on page

HttpClientConfig

A set of configuration options, which allows HttpClient to perform requests and process responses.

Type parameters

T
Common body shape defined by bodyParser.

Hierarchy

  • HttpClientConfig

Index

Properties

Properties

Optional baseUrl

baseUrl? : undefined | string
URL that is applied to all requests without specified protocol and domain.

Optional bodyParser

bodyParser? : BodyParser‹T›
A utility that parses and normalizes body of a response received from server. Can be used to decode JSON object, URL-encoded body or plain text. Built-in bodyParser supports case-conversion.

Optional bodySerializer

bodySerializer? : BodySerializer
A utility that parses and normalizes body of a request sent to server. Can be used to encode JSON object, URL-encoded body or plain text. Built-in bodySerializer supports case-conversion.

Optional headers

headers? : HttpHeaders
Headers that will be passed to all requests. To add headers dynamically, you can use an interceptor instead.

Optional queryParserOptions

queryParserOptions? : qs.IParseOptions
Allow to parse query options in a different way than the standard one.

Optional querySerializerOptions

querySerializerOptions? : qs.IStringifyOptions
Allow to serialize query options in a different way than the standard one.

requestHandler

requestHandler: HttpRequestHandler
An implementation of request handler, which handles "low-level" HTTP communication. Result of executing a request via RequestHandler is a normalized object, which can be further processed by interceptors and HttpClient.

Optional requestTimeout

requestTimeout? : undefined | number
Standard timeout, triggered when server does not respond with headers within specified period of time.