Skip to content

How do I read a cookie value? #826

@pipiscrew

Description

@pipiscrew

hi,

using the library in simple way, as example :

private readonly WebView web_view;

        public Form1()
        {
            InitializeComponent();
            web_view = new WebView("http://x.com/", new BrowserSettings());
            web_view.Dock = DockStyle.Fill;
            this.Controls.Add(web_view);
        }

where the user login through CefSharp browser. I would like to read the PHPSESSIONID value stored in cookie. how can I do that?

thanks

[edit]
seems the only way, I add

    class webview_cookies : ICookieVisitor
    {
        public bool Visit(Cookie cookie, int count, int total, ref bool deleteCookie)
        {
            Console.WriteLine(cookie.Name +" = " +  cookie.Value);

            return true;
        }
    }

when I like to read the cookie

            webview_cookies o = new webview_cookies();

            CEF.VisitAllCookies(o);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions