Zum Hauptinhalt springen

HttpRestClientConfig

HttpRestClientConfig = object

Properties

url?

optional url: string

URL that will be used for the request


method?

optional method: HTTPMethod

The request method to be used when making the request.

Currently supported Methods are:

  • "GET"
  • "POST"
  • "PUT"
  • "DELETE"

headers?

optional headers: object

Custom headers to be sent

Index Signature

[key: string]: string

content-type?

optional content-type: HeaderContentType


data?

optional data: HttpClientRequestData

Form-Data to be sent as the request body. This causes curl to POST data using the Content-Type multipart/form-data according to RFC 2388.


timeout?

optional timeout: number

timeout in ms. Specifies the number of milliseconds before the request times out. If the request takes longer than timeout, the request will be aborted.

Default

5000

auth?

optional auth: object

auth indicates that HTTP Basic auth should be used, and supplies credentials.

username

username: string

password

password: string


followRedirects?

optional followRedirects: boolean

Should follow request when HTTP reponse was 3xx

Default

{true}

ignoreSelfSignedCertificate?

optional ignoreSelfSignedCertificate: boolean

If this flag is true, the request accepts self signed certifcates.

Default

{false}

downloadDestinationPath?

optional downloadDestinationPath: string

If this is specified, request will download a file to the given path.