ArcGIS API for JavaScript: encode/encode_layers (MapServer)
Built using the ArcGIS API for JavaScript