progrium / darwinkit

Native Mac APIs for Go. Previously known as MacDriver
MIT License
4.99k stars 158 forks source link

user-agent? #252

Closed RRancio closed 3 months ago

RRancio commented 6 months ago

i was looking at the examples on the repo, and tried some ways to add a "user-agent" header, but i wasn't able, does this feature exists on this API?

image

(ignore the malformed url)

progrium commented 6 months ago

The webview (wv) should have a customUserAgent property. Did you try wv.SetCustomUserAgent("My user agent")?

progrium commented 3 months ago

Hope this helped.