Skip to main content

Server

Server class is used to query mapsvg backend services

Index

Constructors

constructor

  • new Server(apiUrl: string): Server
  • Parameters

    • apiUrl: string

    Returns Server

Properties

apiUrl

apiUrl: string

completeChunks

completeChunks: number

deleteAvailable

deleteAvailable: boolean = null

putAvailable

putAvailable: boolean = null

Methods

ajax

  • ajax(path: string, data: { contentType?: boolean; data: any; processData?: boolean; type: string }): JQueryPromise<any>
  • Parameters

    • path: string
    • data: { contentType?: boolean; data: any; processData?: boolean; type: string }

    Returns JQueryPromise<any>

checkMethodAvailability

  • checkMethodAvailability(method: DELETE | PUT): Promise<boolean>
  • Parameters

    • method: DELETE | PUT

    Returns Promise<boolean>

delete

  • delete(path: string): JQueryPromise<any>
  • Parameters

    • path: string

    Returns JQueryPromise<any>

fetch

  • fetch(path: string, data?: any): Promise<any>
  • Parameters

    • path: string
    • optionaldata: any

    Returns Promise<any>

get

  • get(path: string, data?: any): JQueryPromise<any>
  • Parameters

    • path: string
    • optionaldata: any

    Returns JQueryPromise<any>

getUrl

  • getUrl(path: any): any
  • Parameters

    • path: any

    Returns any

post

  • post(path: string, data?: any): JQueryPromise<any>
  • Parameters

    • path: string
    • optionaldata: any

    Returns JQueryPromise<any>

processObjectData

  • processObjectData(data: any): void
  • jQuery strips out empty arrays, making it impossible (for example) to delete the last image in collection Here we replace empty arrays with null values


    Parameters

    • data: any

    Returns void

put

  • put(path: string, data?: any): JQueryPromise<any>
  • Parameters

    • path: string
    • optionaldata: any

    Returns JQueryPromise<any>