Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AbstractBrowser.php

function AbstractBrowser::xmlHttpRequest

File

vendor/symfony/browser-kit/AbstractBrowser.php, line 150

Class

AbstractBrowser
Simulates a browser.

Namespace

Symfony\Component\BrowserKit

Code

public function xmlHttpRequest(string $method, string $uri, array $parameters = [], array $files = [], array $server = [], ?string $content = null, bool $changeHistory = true) : Crawler {
    $this->setServerParameter('HTTP_X_REQUESTED_WITH', 'XMLHttpRequest');
    try {
        return $this->request($method, $uri, $parameters, $files, $server, $content, $changeHistory);
    } finally {
        unset($this->server['HTTP_X_REQUESTED_WITH']);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal