Options
All
  • Public
  • Public/Protected
  • All
Menu
class
classdesc

Performs HTTP requests for external APIs

Hierarchy

  • apiService

Index

Methods

Static getData

  • getData(urls: any): Promise<Object>
  • function

    getData

    description

    Performs a GET request for external api

    Parameters

    • urls: any

      URL of the REST api to be hit

    Returns Promise<Object>

    Response object from the url hit

Static postDataFormEncoded

  • postDataFormEncoded(data: any, urls: any): Promise<Object>
  • function

    postDataFormEncoded

    description

    Performs POST requests for MIME type application/x-www-form-urlencoded for external api

    Parameters

    • data: any

      Information to be sent i.e POST parameters

    • urls: any

      URL of the REST api to be hit

    Returns Promise<Object>

    A promise object

Static postRawFormData

  • postRawFormData(data: any, urls: any, authorizationKey: any): Promise<Object>
  • function

    postRawFormData

    description

    Performs a POST request for MIME type application/json. Here, it is used for sending notifications.

    Parameters

    • data: any

      POST request parameters

    • urls: any

      URL of the REST api to be hit

    • authorizationKey: any

      auth key used for notification

    Returns Promise<Object>

    Response object from the url hit

Generated using TypeDoc