URL Encoding

The purpose of the user guide is to enable Reveal Integration developers with an understanding of how to create valid URL with characters that cannot be part of a URL (for example, the space) and some other characters that have a special meaning in a URL.

URLs cannot contain spaces. For example, spaces in a string are either encoded with %20 or replaced with the plus sign (+). If you use an ampersand character (&) as a separator, be sure to encode the ampersand as %26. A comma in a string should be encoded as %2C

 

Building a Valid URL

A URL entered within an address bar in a browser, for example, may contain special characters (e.g. “! * ' ( ) ; : @ &”) the browser needs to internally translate those characters before sending them out to a web server. All characters to be URL-encoded are encoded using a '%' character and a two-character hex value corresponding to their UTF-8 character. 

For example :  

API URL - https://fim.api.eu.fleetmatics.com:443/cmd/v1/vehicles/1234&1234

Encoded URL - https://fim.api.eu.fleetmatics.com:443/cmd/v1/vehicles/1234%261234

 

Supported characters that need encoding

Supported characters that must be encoded are:

Unsafe character

Encoded value

Space

%20

"

%22

#

%23

%

%25

|

%7C

&

%26

-

%2D

< 

%3C

> 

%3E

(

%28

)

%29

 

Note: It is recommended to use any of the above listed special characters with the vehicle names while encoding the URL. Use of any unsupported characters may result in errors

 

Recommended

We recommended that you use our Test client to ensure encoding for your URLs, to ensure the URLs will work properly. Select the option Encode URL to see the encoded version.