Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HttpClient

The HTTPClient will use the JWTToken and Host/Site set in the SettingsStorageService to connect dotCMS REST Endpoints

Hierarchy

  • HttpClient

Index

Constructors

constructor

Properties

Private http

http: Http

Private progress

progress: number

progress$

progress$: any

Private progressObserver

progressObserver: any

Private settingsStorageService

settingsStorageService: SettingsStorageService

Methods

createAuthorizationHeader

  • createAuthorizationHeader(headers: Headers): void

filePut

  • filePut(path: String, file: File, data: Object): Observable<any>
  • Intended to simply saving FileAssets to dotCMS. Currently uses a debouce time of 400 and distinctUntilChanged flags on a GET request. This is intended to limit unecessary requests to the dotCMS Endpoints. Will append needed dotCMS Host/Site and JWT AUth Token

    Parameters

    • path: String

      path Endpoint path

    • file: File

      Binary file to save

    • data: Object

    Returns Observable<any>

get

  • get(path: string): Observable<Response>
  • Currently uses a debouce time of 400 and distinctUntilChanged flags on a GET request. This is intended to limit unecessary requests to the dotCMS Endpoints. Will append needed dotCMS Host/Site and JWT AUth Token

    Parameters

    • path: string

      Endpoint path

    Returns Observable<Response>

post

  • post(path: String, data: Object): Observable<Response>
  • Currently uses a debouce time of 400 and distinctUntilChanged flags on a GET request. This is intended to limit unecessary requests to the dotCMS Endpoints. Will append needed dotCMS Host/Site and JWT AUth Token

    Parameters

    • path: String

      path Endpoint path

    • data: Object

      Object to be POSTed. Will be converted to JSON String(JSON.stringify)

    Returns Observable<Response>

put

  • put(path: String, data: Object): Observable<Response>
  • Currently uses a debouce time of 400 and distinctUntilChanged flags on a GET request. This is intended to limit unecessary requests to the dotCMS Endpoints. Will append needed dotCMS Host/Site and JWT AUth Token

    Parameters

    • path: String

      path Endpoint path

    • data: Object

      Object to be PUT. Will be converted to JSON String(JSON.stringify)

    Returns Observable<Response>

Generated using TypeDoc