authenticatingUri static method

String authenticatingUri(
  1. String uri,
  2. String username,
  3. String password
)

Implementation

static String authenticatingUri(
    String uri, String username, String password) {
  final parsedUri = Uri.parse(uri);

  return Uri(
          scheme: parsedUri.scheme,
          userInfo: '$username:$password',
          host: parsedUri.host,
          port: parsedUri.port,
          pathSegments: parsedUri.pathSegments,
          queryParameters: parsedUri.queryParameters.isNotEmpty
              ? parsedUri.queryParameters
              : null)
      .toString();
}