Interface: IMTLSClient
Interface definition for the mTLS Client.
Table of contents
Methods
Methods
delete
▸ delete(url, headers?, body?, options?): Promise<MTLSResponse>
Performs a mTLS delete request using the configured client certificate + key.
Parameters
| Name | Type | Description | 
|---|---|---|
| url | string | |
| headers? | Header | |
| body? | any | |
| options? | MTLSOptions | Request specific options | 
Returns
Promise<MTLSResponse>
get
▸ get(url, headers?, body?, options?): Promise<MTLSResponse>
Performs a mTLS get request using the configured client certificate + key
Parameters
| Name | Type | Description | 
|---|---|---|
| url | string | |
| headers? | Header | |
| body? | any | |
| options? | MTLSOptions | Request specific options | 
Returns
Promise<MTLSResponse>
head
▸ head(url, headers?, options?): Promise<MTLSResponse>
Performs a mTLS head request using the configured client certificate + key. Any body returned by the endpoint will be ignored and forcefully overridden with undefined.
Parameters
| Name | Type | Description | 
|---|---|---|
| url | string | |
| headers? | Header | |
| options? | MTLSOptions | Request specific options | 
Returns
Promise<MTLSResponse>
options
▸ options(url, headers?, options?): Promise<MTLSResponse>
Performs a mTLS options request using the configured client certificate + key. Any body returned by the endpoint will be ignored and forcefully overridden with undefined.
Parameters
| Name | Type | Description | 
|---|---|---|
| url | string | |
| headers? | Header | |
| options? | MTLSOptions | Request specific options | 
Returns
Promise<MTLSResponse>
patch
▸ patch(url, headers?, body?, options?): Promise<MTLSResponse>
Performs a mTLS put request using the configured client certificate + key.
Parameters
| Name | Type | Description | 
|---|---|---|
| url | string | |
| headers? | Header | |
| body? | any | |
| options? | MTLSOptions | Request specific options | 
Returns
Promise<MTLSResponse>
post
▸ post(url, headers?, body?, options?): Promise<MTLSResponse>
Performs a mTLS post request using the configured client certificate + key.
Parameters
| Name | Type | Description | 
|---|---|---|
| url | string | |
| headers? | Header | |
| body? | any | |
| options? | MTLSOptions | Request specific options | 
Returns
Promise<MTLSResponse>
put
▸ put(url, headers?, body?, options?): Promise<MTLSResponse>
Performs a mTLS put request using the configured client certificate + key.
Parameters
| Name | Type | Description | 
|---|---|---|
| url | string | |
| headers? | Header | |
| body? | any | |
| options? | MTLSOptions | Request specific options | 
Returns
Promise<MTLSResponse>
Related Interfaces / Type
Interface: MTLSResponse
Properties:
- 
headers: [key: string]:string
- 
statusCode: number
- 
Optionalbody:any
Interface: MTLSOptions
Properties:
- 
OptionalallowSelfSigned:boolean
To ignore errors raised by self-signed certificates on the called endpoint. Alternatively you can provide the ca-cert as part of the clientTLS config.
- 
Optionaljson:boolean
Set this flag to true, to automatically stringify body + set correct content header and parse response to JSON.
- 
Optionaltimeout:number
Time in ms until request should timeout. Please be aware that mTLS calls take longer than regular HTTP calls.
Interface: Header
Properties:
- [name: string]:string
Interface: ClientTLS
Properties:
- 
Optionalca:string|Buffer
Certificate of the CA, this is relevant when endpoint that is called has a self-signed certificate. The certificate needs to be in PEM format.
- 
cert: string|Buffer
CLient Certificate in PEM format.
- 
key: string|Buffer
Client Key in PEM format.
