XHR is not visible in debug kit

I use PHP CAKE 5, and vanilla js, ajax loading example:

        try {
            const response = await fetch(url, {
                headers: { 'X-Requested-With': 'XMLHttpRequest' },
                credentials: 'same-origin'
            });

            if (!response.ok) throw new Error('Error: ' + response.status);
            const html = await response.text();
            content.innerHTML = html;

        } catch (e) {
            content.innerHTML = `<p class="text-red-600">${e.message}</p>`;
        }

The request is AJAX, but the debug kit doesn’t show anything (history XHR), why?

Yes, there seems to be a problem with the AJAX proxy related to the native JS fetch method.

BUT you can always just click the “Reload” Button in the History Tab and you can manually select the AJAX request.

You can try this change

1 Like

It works, thank you very much!