Skip to main content


sends a GET request to the server

get<T>(url: string, data?: { [key: string]: any; } | string, config?: Partial<IAjaxHelperConfig>): Promise<T>;


  • url: string - the URL the request is sent to
  • data: object - optional, the data sent to the server by the GET-request
  • config: object - the configuration object of the request


A "promise" of the data object.


dhx.ajax.get(url).then(function (data) {    console.log(data);}).catch(function (err) {    console.log(err);});

Related sample: Data. Ajax GET

The config object can contain the following options:

  • responseType - the type of data that you are expecting back from the server. The available types are:
    • text - returns the plain text as a string
    • xml - returns the result parsed as XML
    • json - returns the result as JSON
  • headers - (object) optional, the headers of the request