Give `portalLib.serviceUrl()` option to create websocket URLs too

Feature request.

It would be great if portalLib.serviceUrl() could create urls with the websocket protocols (ws://, wss://) in addition to http.

Maybe extending the type parameter with another option could be a solution?

This is what I currently do:

  const url = portalLib.serviceUrl({
    service: 'my-service',
    type: "absolute"
    .replace("http://", "ws://")
    .replace("https://", "wss://");

Yeah, that is a pain with an ugly but working workaround.

We have an issue in Github for that already.


I guess this actually applies to most “url” functions, not just serviceUrl?

ETA XP 7.7 - follow the task for more details

1 Like