Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
André Alho
1881
Views
5
Comments
Solved
Change dynamically REST API URL
Question
Hi everyone!
I have an issue regarding a REST API integration.
1st of all we call a method to get an
Authorization Token
and an
end point URL
. No problem!
2nd This service specifically uses some kind of load balancer and will return the URL where we should do next requests with Authorization Token. And now we have a problem! We can only do that on service center... :(
Do you guys know any way of changing dynamically the URL of the REST API?
Something like Extension
EnhancedWebReferences
- Method
SetWebReferenceURL
Thanks
André Alho
Solution
Solved! :)
Thanks
See solution in context
Kilian Hekhuis
MVP
Hi Andre,
I've never done it, but I think you can do stuff in the OnBeforeRequest, especially the advanced one. You can find more info
here
.
João Rosado
Staff
Just a quick note on Killian answer.
The url can only be set in the
OnBeforeRequest. The url is pretty much the only thing that cannot be changed in the
OnBeforeRequestAdvanced since the C#/Java correspondent Request objects are already created at that point and the url is readonly in them.
Regards,
João Rosado
Kilian Hekhuis
MVP
Ok, I stand corrected. Thanks!
André Alho
Solution
Solved! :)
Thanks
Martin den Braven
Hi!
I have an additional question (also made a post
here
)
At the moment I use the OnBeforeRequestAdvanced event to call an extention to add NTLM authentication to the request. But because it is a shared component between several applications we have different endpoints en we also want to change the baseURL. But this is not possible in the advanced event.
Is there a solution for this problem?
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...