Layer7 API Management

  • 1.  URL Encode the "Space" to "%20"

    Posted Apr 04, 2017 10:49 PM

    How can we URL Encode the "Space" to "%20". When the assertion "Encode/Decode Data" is used , the "Space" is getting encoded as "+". But we are expecting it to be "%20". Is there any work around to change this behavior ?

    Below is the example:

    Before Encoding: This has SPACE
    After Encoding: This+has+SPACE

     

    Expected result : This%20has%20SPACE



  • 2.  Re: URL Encode the "Space" to "%20"
    Best Answer

    Broadcom Employee
    Posted Apr 05, 2017 07:43 PM

    Hello suhas.mv ,

    This is expected and as per Forms in HTML documents.

    If you prefer %20, you will have to use Evaluate Regular Expression assertion to replace '+' to '%20'.

     

    Regards,

    Mark