How to Auto URL Encode by using a Map shape

Document created by Rabia_Sozkesen Employee on Jun 11, 2015Last modified by Adam Arrowsmith on Feb 2, 2017
Version 3Show Document
  • View in full screen mode

Customer is looking for a way to auto encode his URL (for example changing the space to %20):

 

Before: http://www.testsite.com/api=Insert&name=John Doe

 

After: htttp://www.testsite.com/api=Insert&name=John%20Doe

 

The best way to proceed with the string design would be custom scripting. However that step can be simplified by using a map so that you can fix the issue by making changes field by field through a map shape:

  1. Create a map shape and map the source fields to target (self referencing).
  2. Putting a custom script in between those fields that may have special characters that need URL Encoded.
  3. Custom example --- EncodedFirstName = URLEncoder.encode(OrigFirstName,"UTF-8"); -- where OrigFirstName was the left side Name field and EncodedFirstName is what I outputted to the right side Name field.
3 people found this helpful

Attachments

    Outcomes