1 backdrop_web_test_case.php protected BackdropWebTestCase::backdropGetAJAX($path, array $options = array(), array $headers = array())

Retrieve a Backdrop path or an absolute path and JSON decode the result.

File

core/modules/simpletest/backdrop_web_test_case.php, line 2199

Class

BackdropWebTestCase
Test case for typical Backdrop tests.

Code

protected function backdropGetAJAX($path, array $options = array(), array $headers = array()) {
  $headers[] = 'X-Requested-With: XMLHttpRequest';
  $headers[] = 'Accept: application/vnd.backdrop-ajax, */*; q=0.01';
  return backdrop_json_decode($this->backdropGet($path, $options, $headers));
}