Hi Ben
If you want to read more to this, I refer to the same question that has been asked here: https://forum.mendix.com/link/questions/62292 and also, if you’re stuck with putting the user name in a header, simply add the action call REST-service and place the username in the HTTP Headers tab to the header you want:
Developing a custom Java action might just do the trick for you, or, inspecting this marketplace module: https://marketplace.mendix.com/link/component/105988
Hope this helps.
Kind regards,
Leander