Skip to Content

URL encode

I would like to encode a URL in absl.
e.g.
& -> %26
One method would be to replace all umlauts and other special characters, but there are quite a lot of them.
Is there a function available for encoding an URL?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 22, 2016 at 01:39 PM

    Hi Peter,

    This might help:

    import AP.CRM.Global;
    import AP.PlatinumEngineering;
    var raw_url = "http://www.example.com/url_with_special?&characters=öäü";
    var encoded_url = URL.Encode(raw_url);
    
    // encoded_url would be: "http%3A%2F%2Fwww.example.com%2Furl_with_special%3F%26characters%3D%C3%B6%C3%A4%C3%BC"

    Best Regards,
    Stefan

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 22, 2016 at 11:41 AM

    Hi Peter,

    I don't think there is any function to encode URL in ABSL.

    Thanks, Pradeep.

    Add comment
    10|10000 characters needed characters exceeded