Options
All
  • Public
  • Public/Protected
  • All
Menu

Class for working with a REST endpoint using a REST request

Hierarchy

Index

Constructors

constructor

  • new RESTSourceREST(endpoint: string, method?: string, body?: string, filename?: string, headers?: {}[], auth?: string): RESTSourceREST
  • Parameters

    • endpoint: string

      URL of the data source from where the JSON needs to be read.

    • method: string = 'GET'

      HTTP method. Defaults to 'GET'.

    • body: string = ''

      Body of HTTP request (can be left empty for GET requests). Defaults to ''.

    • Optional filename: string

      Name of the output file. Optional.

    • Optional headers: {}[]

      HTTP headers, e.g. [{"Content-Type":"application/json"}, {"Custom-Auth-Token":"xysazxklj4568asdf46a5sd4f"}]. Optional.

    • Optional auth: string

      Basic authentication i.e. 'user:password' to compute an Authorization header. Optional.

    Returns RESTSourceREST

Properties

auth

auth: undefined | string

body

body: string

datasource

datasource: string

endpoint

endpoint: string

filename

filename: undefined | string

headers

headers: undefined | {}[]

method

method: string

Methods

asDict

  • asDict(): {}

Generated using TypeDoc