C#

using DotNetBrowser;
using DotNetBrowser.WinForms;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Windows.Forms;

namespace GetAjaxResponseBodySample
{
public partial class Form1 : Form
{
    private static List<string> ajaxUrls = new List<string>();
    private WinFormsBrowserView browserView;

    public Form1()
    {
        InitializeComponent();
        browserView = new WinFormsBrowserView();
        browserView.Browser.Context.NetworkService.ResourceHandler = new AjaxResourceHandler();
        browserView.Browser.Context.NetworkService.NetworkDelegate = new AjaxNetworkDelegate();
        Controls.Add(browserView);
        browserView.Browser.LoadURL("https://www.w3schools.com/js/js_ajax_examples.asp");
    }

    private class AjaxResourceHandler : ResourceHandler
    {
        public bool CanLoadResource(ResourceParams parameters)
        {
            if (parameters.ResourceType == ResourceType.XHR)
            {
                Debug.WriteLine("Intercepted AJAX request: " + parameters.URL);
                ajaxUrls.Add(parameters.URL);
            }
            return true;
        }
    }

    private class AjaxNetworkDelegate : DefaultNetworkDelegate
    {
        public override void OnDataReceived(DataReceivedParams parameters)
        {
            if (ajaxUrls.Contains(parameters.Url))
            {
                Debug.WriteLine("Captured response for: " + parameters.Url);
                Debug.WriteLine("MimeType = " + parameters.MimeType);
                Debug.WriteLine("Charset = " + parameters.Charset);
                PrintResponseData(parameters.Data);
            }
        }

        private void PrintResponseData(byte[] data) {
            Debug.WriteLine("Data = ");
            var str = Encoding.Default.GetString(data);
            Debug.WriteLine(str);
        }
    }
}
}

VB.NET

Imports System.Text
Imports DotNetBrowser
Imports DotNetBrowser.WinForms

Public Partial Class Form1
    Inherits Form

    Private Shared ajaxUrls As List(Of String) = New List(Of String)()
    Private browserView As WinFormsBrowserView

    Public Sub New()
        InitializeComponent()
        browserView = New WinFormsBrowserView()
        browserView.Browser.Context.NetworkService.ResourceHandler = New AjaxResourceHandler()
        browserView.Browser.Context.NetworkService.NetworkDelegate = New AjaxNetworkDelegate()
        Controls.Add(browserView)
        browserView.Browser.LoadURL("https://www.w3schools.com/js/js_ajax_examples.asp")
    End Sub

    Private Class AjaxResourceHandler
        Implements ResourceHandler

        Public Function CanLoadResource(ByVal parameters As ResourceParams) As Boolean _
            Implements ResourceHandler.CanLoadResource
            If parameters.ResourceType = ResourceType.XHR Then
                Debug.WriteLine("Intercepted AJAX request: " & parameters.URL)
                ajaxUrls.Add(parameters.URL)
            End If

            Return True
        End Function
    End Class

    Private Class AjaxNetworkDelegate
        Inherits DefaultNetworkDelegate

        Public Overrides Sub OnDataReceived(ByVal parameters As DataReceivedParams)
            If ajaxUrls.Contains(parameters.Url) Then
                Debug.WriteLine("Captured response for: " & parameters.Url)
                Debug.WriteLine("MimeType = " & parameters.MimeType)
                Debug.WriteLine("Charset = " & parameters.Charset)
                PrintResponseData(parameters.Data)
            End If
        End Sub

        Private Sub PrintResponseData(ByVal data As Byte())
            Debug.WriteLine("Data = ")
            Dim str = Encoding.[Default].GetString(data)
            Debug.WriteLine(str)
        End Sub
    End Class
End Class