ArcGIS API for JavaScript: FunctionalClassRequest (FeatureServer)
Built using the ArcGIS API for JavaScript