How to set the header of a web-session

Need some help…
I want to mock a service by setting the header properties. I found some examples for API calls but I’m using a browser session (and don’t want to use an extension).

How do I set the header of an active browser session? Or is mij approach incorrect?
Thanks!!

Same code I’m using :

WebUI.openBrowser("https://my.site.nl/")

// RequestObject request = new RequestObject()
// RequestObject request = findTestObject('Object Repository/...')
RequestObject request = ?

ArrayList HTTPHeader = new ArrayList()
HTTPHeader.add(new TestObjectProperty('XXX', ConditionType.EQUALS, 'XXX'))
request.setHttpHeaderProperties(HTTPHeader)

Give this a read:

Sorry, that’s WAY more complex than I can handle, being a newbie to katalon.

Surely we can just add half a dozen lines of code after WebUI.openBrowser? Or something like that?

Thanks in advance!