NetworkClientSetUserAgentOverrideAsync Method |
Version 87.1.132
Allows overriding user agent with the given string.
Namespace:
CefSharp.DevTools.Network
Assembly:
CefSharp (in CefSharp.dll) Version: 87.1.132.0 (87.1.132.0)
Syntax public Task<DevToolsMethodResponse> SetUserAgentOverrideAsync(
string userAgent,
string acceptLanguage = null,
string platform = null,
UserAgentMetadata userAgentMetadata = null
)
public:
Task<DevToolsMethodResponse^>^ SetUserAgentOverrideAsync(
String^ userAgent,
String^ acceptLanguage = nullptr,
String^ platform = nullptr,
UserAgentMetadata^ userAgentMetadata = nullptr
)
Parameters
- userAgent
- Type: SystemString
User agent to use. - acceptLanguage (Optional)
- Type: SystemString
Browser langugage to emulate. - platform (Optional)
- Type: SystemString
The platform navigator.platform should return. - userAgentMetadata (Optional)
- Type: CefSharp.DevTools.EmulationUserAgentMetadata
To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
Return Value
Type:
TaskDevToolsMethodResponsereturns System.Threading.Tasks.Task<DevToolsMethodResponse>
See Also