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
Optional
baseUrl• baseUrl? : undefined | string
URL that is applied to all requests without specified protocol and domain.
Optional
bodyParser
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
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
Optional
headers• headers? : HttpHeaders
Headers that will be passed to all requests. To add headers dynamically, you can use an interceptor instead.
Optional
queryParserOptions
Optional
queryParserOptions• queryParserOptions? : qs.IParseOptions
Allow to parse query options in a different way than the standard one.
Optional
querySerializerOptions
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.
For Node.js environment, use httpRequestHandler
For browser environments, use fetchRequestHandler
For React Native and any other environment, use xhrRequestHandler
Optional
requestTimeout
Optional
requestTimeout• requestTimeout? : undefined | number
Standard timeout, triggered when server does not respond with headers within specified period of time.
default
DEFAULT_REQUEST_TIMEOUT_MS
Last updated