简体   繁体   English

如何从CefSharp浏览器获取请求标头?

[英]How to get request headers from the CefSharp browser?

How can I retrieve the request headers when sending a POST request using the CefSharp browser? 使用CefSharp浏览器发送POST请求时,如何检索请求标头?

Do I need to subscribe to an event? 我需要订阅活动吗?

Try implementing IRequestHandler.OnBeforeBrowse , you should have access to the request before it's sent to the server. 尝试实现IRequestHandler.OnBeforeBrowse ,您可以在将请求发送到服务器之前对其进行访问。

https://github.com/cefsharp/CefSharp/blob/cefsharp/43/CefSharp/IRequestHandler.cs#L23 https://github.com/cefsharp/CefSharp/blob/cefsharp/43/CefSharp/IRequestHandler.cs#L23

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM