How to access external sites from the Service Portal using POST.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 07:04 PM
Hello community,
I'm creating Service Portal site and I'm trying to figure out how to make POST requests to external sites. Specifically, I want to use the icon link widget to send an ID and password when accessing a particular URL.
Any guidance or examples on achieving this would be greatly appreciated.
Thank you in advance for your assistance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 02:14 PM
Lacking further details (as to what is to be called with which parameters) I can only propose having a look at the documentation for $http service, which service can be used from a widget('s client controller) to execute any kind of HTTP calls.
Another option would be to do the call from server side, in which case the widget can trigger the server side code from withing the client controller with help of the server.get() API.
This way you would be able to build out a more secure solution where the user and the password you mention would not need to be exposed client side - this would actually be the preferred more secure way, unless the user and the password are to be entered by the user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 04:51 AM