getSanitisedUri function

Uri getSanitisedUri(
  1. ParseClient client,
  2. String pathToAppend, {
  3. Map<String, dynamic>? queryParams,
  4. String? query,
})

Sanitises a url

Implementation

Uri getSanitisedUri(ParseClient client, String pathToAppend,
    {Map<String, dynamic>? queryParams, String? query}) {
  final Uri tempUri = Uri.parse(ParseCoreData().serverUrl);

  final Uri url = Uri(
      scheme: tempUri.scheme,
      host: tempUri.host,
      port: tempUri.port,
      path: '${tempUri.path}$pathToAppend',
      queryParameters: queryParams,
      query: query);

  return url;
}