Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
BodySerializerOptions
Optional
bodyCasing• bodyCasing? : BodyCasing
Defined in packages/http/src/bodySerializer.ts:10
FetchRequestHandlerOptions
Optional
defaultRequestOptions• defaultRequestOptions? : RequestInit
Defined in packages/http/src/requestHandlers/fetch.requestHandler.ts:7
A set of configuration options, which allows to perform
▪ T
HttpClientConfig
Optional
baseUrl• baseUrl? : undefined | string
URL that is applied to all requests without specified protocol and domain.
Optional
bodyParserOptional
bodySerializerOptional
defaultHeadersProviderOld way of passing global headers to requests. To add headers dynamically, you can use an interceptor instead. To add a set of static headers, pass them to request handler options directly.
deprecated
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.
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.
Defined in
• bodyParser? : ‹T›
Defined in
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 supports case-conversion.
• bodySerializer? :
Defined in
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 supports case-conversion.
• defaultHeadersProvider? :
Defined in
Defined in
Defined in
• requestHandler:
Defined in
For Node.js environment, use
For browser environments, use
For React Native and any other environment, use
Defined in
default
Defined in
Defined in
BodyParserOptions
Optional
bodyCasing• bodyCasing? : BodyCasing
Defined in packages/http/src/bodyParser.ts:9
Optional
defaultParser• defaultParser? : BodyParserImplementation
Defined in packages/http/src/bodyParser.ts:10
Endpoint
• handler: function
Defined in packages/http/src/requestHandlers/mock.requestHandler.ts:29
▸ (request
: NormalizedHttpOptions): Promise‹RawHttpResponse›
Parameters:
• match: string | RegExp
Defined in packages/http/src/requestHandlers/mock.requestHandler.ts:28
Name
Type
request
HttpRequestHandlerOptions
Optional
defaultRequestOptions• defaultRequestOptions? : ClientRequestArgs
Defined in packages/http/src/requestHandlers/http.requestHandler.ts:10
HttpRequestOptions
Optional
body• body? : HttpBody
Defined in packages/http/src/httpClient.types.ts:59
Optional
bypassResponseHandler• bypassResponseHandler? : undefined | false | true
Defined in packages/http/src/httpClient.types.ts:60
Optional
headers• headers? : HttpHeaders
Defined in packages/http/src/httpClient.types.ts:58
• method: HttpMethod
Defined in packages/http/src/httpClient.types.ts:55
Optional
mode• mode? : RequestMode
Defined in packages/http/src/httpClient.types.ts:57
Optional
query• query? : undefined | object
Defined in packages/http/src/httpClient.types.ts:56
Optional
timeout• timeout? : undefined | number
Defined in packages/http/src/httpClient.types.ts:61
HttpInterceptorInterface
▸ onIntercept<Body>(request
: HttpFetch‹Body›, options
: NormalizedHttpOptions): HttpFetch‹Body›
Defined in packages/http/src/httpClient.types.ts:34
Type parameters:
▪ Body
Parameters:
Returns: HttpFetch‹Body›
▪ T
↳ HttpResponse
• ok: boolean
• redirected: boolean
• status: number
• statusText: string
• url: string
▸ abort(): void
Returns: void
▸ arrayBuffer(): Promise‹ArrayBuffer›
Returns: Promise‹ArrayBuffer›
▸ parsedBody(): Promise‹T›
Returns: Promise‹T›
▸ text(): Promise‹string›
Returns: Promise‹string›
• headers:
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Defined in
Inherited from .
Defined in
Name
Type
request
HttpFetch‹Body›
options
HttpResponseOptions
Optional
body• body? : NormalizedHttpBody
Defined in packages/http/src/httpResponse.ts:11
Optional
headers• headers? : HttpHeaders
Defined in packages/http/src/httpResponse.ts:9
• status: number
Defined in packages/http/src/httpResponse.ts:10
Optional
url• url? : undefined | string
Defined in packages/http/src/httpResponse.ts:8
Log
• duration: number
Defined in packages/http/src/interceptors/loggingInterceptor.ts:7
Optional
error• error? : any
Defined in packages/http/src/interceptors/loggingInterceptor.ts:6
• request: HttpRequestOptions
Defined in packages/http/src/interceptors/loggingInterceptor.ts:4
Optional
response• response? : HttpResponse
Defined in packages/http/src/interceptors/loggingInterceptor.ts:5
• body? :
Defined in
Defined in
Defined in
• method:
Defined in
• mode? :
Defined in
Defined in
Defined in
Defined in
RedirectionInterceptorOptions
Optional
redirectionLimit• redirectionLimit? : undefined | number
Defined in packages/http/src/interceptors/redirectionInterceptor.ts:5
RawHttpResponse
• headers: HttpResponseHeaders
Defined in packages/http/src/httpClient.types.ts:5
• ok: boolean
Defined in packages/http/src/httpClient.types.ts:6
• redirected: boolean
Defined in packages/http/src/httpClient.types.ts:7
• status: number
Defined in packages/http/src/httpClient.types.ts:8
• statusText: string
Defined in packages/http/src/httpClient.types.ts:9
• url: string
Defined in packages/http/src/httpClient.types.ts:10
▸ abort(): void
Defined in packages/http/src/httpClient.types.ts:16
Returns: void
▸ arrayBuffer(): Promise‹ArrayBuffer›
Defined in packages/http/src/httpClient.types.ts:12
Returns: Promise‹ArrayBuffer›
▸ text(): Promise‹string›
Defined in packages/http/src/httpClient.types.ts:14
Returns: Promise‹string›
Name | Type |
|
Defined in
Defined in
SimpleServer
• close: function
Defined in packages/http/src/testing/createSimpleServer.helper.ts:22
▸ (): Promise‹void›
• fullAddress: string
Defined in packages/http/src/testing/createSimpleServer.helper.ts:21
• host: string
Defined in packages/http/src/testing/createSimpleServer.helper.ts:20
• port: number
Defined in packages/http/src/testing/createSimpleServer.helper.ts:19