Encode a URL with a Utility Choreo using the REST API


Temboo does lots more than just work with APIs. We've got a growing collection of programming utilities that will make your life much easier. In this tutorial we'll show you how to use these handy code shortcuts by working through a URL encoding example.

You might ask "why is URL encoding important?" Well, URLs can only be sent over the Internet using the ASCII character-set. Since URLs often contain non-ASCII characters, they need to be converted so they only contain valid characters. The general rule is that unsafe characters are replaced with a % followed by two hexadecimal digits. Spaces are replaced by either a plus sign (+) or with %20. You've probably seen URLs full of strange looking characters, and now you know why!

The good news is that you don't actually have to worry about the specifics. Our URL encoding utility will do all the work for you.

Get Set Up

1 Log in to Temboo. If you don't already have an account, you can register for free.

Test the Choreo

2Go to the Utilities > Encoding > URLEncode Choreo page. Select REST API from the drop down menu at the top of the page.

3Enter some text that you want to URL encode. It should contain illegal characters, like spaces, accents, and punctuation. Here's some text you can use:

Enc0ding URL$ wITh T3mBo0

4 Click Generate Code to test the Choreo from our website, and you'll see the the URL encoded result returned by the Choreo.

Try it with Curl

5Scroll down to find the Code section of the Choreo page and copy the auto-generated cURL command.

6To run the command, paste it directly into your terminal or console. Your code should look something like this:

curl --basic -u APP_NAME: APP_KEY --header "x-temboo-domain: /ACCOUNT_NAME/master" --header "Content-Type: application/json" --header "Accept: application/json" -X POST --data '{"inputs": [{"name":"Text", "value":"Enc0ding URL$ wITh T3mBo0"}]}' "https://ACCOUNT_NAME.temboolive.com/temboo-api/1.0/choreos/Library/Utilities/Encoding/URLEncode"

7Run the code and check out the encoded value that the Choreo gives you.

What next?

We're all finished! Now you're successfully Utility Choreos with our REST API. Check out what else you can do with it by exploring the 2000+ Choreos in our Library.

Once you've got your code up and running, you're ready to move on and do more. From monitoring your running applications, to moving your generated Temboo code to your preferred development environment and sharing it with colleagues, collaborators and friends - we've got you covered.

Get Live Updates About Your Application

Integrate Temboo with Slack to get up-to-the-second notifications and alerts about your deployed Temboo code.

Commit Code to GitHub

Commit Temboo-generated code directly to GitHub and share with the world. Learn more.

Need help?

We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.


Back