@maxgraph/core
    Preparing search index...

    Function post

    • post(
          url: string,
          params?: null | string,
          onload: Function,
          onerror?: null | Function,
      ): void

      Posts the specified params to the given URL asynchronously and invokes the given functions depending on the request status. Returns the MaxXmlRequest in use. Both functions take the MaxXmlRequest as the only parameter. Make sure to use encodeURIComponent for the parameter values.

      Example:

      post(url, 'key=value', (req) => {
      alert('Ready: ' + req.isReady() + ' Status: ' + req.getStatus());
      // Process req.getDocumentElement() using DOM API if OK...
      });

      Parameters

      • url: string

        URL to get the data from.

      • params: null | string = null

        Parameters for the post request.

      • onload: Function

        Optional function to execute for a successful response.

      • onerror: null | Function = null

        Optional function to execute on error.

      Returns void