CefSharp - Get Request Payload

Viewed 939

I want to automate some tasks on a page, and after the user logins and visits the page section, I need to get the request payload, marked in red in the image below:

Screenshot

I was able to get the headers (ex: gwt-permutation), implementing IRequestHandler, like below:

public bool OnResourceResponse(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response)
    {
        string[] headers = request.Headers.AllKeys;

        // enumerate through the header collection. 
        foreach (string s in headers)
        {
            Console.WriteLine("OnResourceResponse - HEADERS: " + s);
            Console.WriteLine("OnResourceResponse - HEADERSValue: " + request.Headers[s]);
        }
        return false;
    }

But I just can't get the the rest of the data, like it's displayed in Chrome DevTools.

Thanks.

0 Answers
Related