REST service, NTLM and change Baseurl

REST service, NTLM and change Baseurl


I'm developing a shared component for different applications we have developed. This component is consuming a REST service which needs NTLM authentication. Therefor is use the OnBeforeRequestAdvanced to call an action in an extention which adds the credentials to the HTTPWebRequest. So far so good.. 
Because it is a share component I also want to set the baseUrl of the request. Normally this can be done in the OnBeforeRequest. It is not possible to use both events, so it has to be done in the OnBeforeRequestAdvanced I think..?

Can someone point me out how to do this? 
Thanks in advance!
Hi Martin,

Per this post, it is not possible to do it in the OnBeforeRequestAdvanced.

Hi Kilian,

Thanks for replying!

In the OnBeforeRequest event the httpwebrequest (obviouslt) null. Is there a possibility to use is after OnbeforeRequest is fired and before the actual request is send?

Apparently I need the OnbeforeRequest and the OnbeforeRequestAdvanced, but the studio won't let me use the both.
Hi Martin,

I'm afraid I can't help you, as I've never used either of them. I just recalled the post and thought I'd post it here. I'd advice you to reply to that other post, and ask Joao (of OutSystems, who made that post) what to do in your use case, which seems a valid thing to do (but perhaps there's some other way).