All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codacy.client.bitbucket.util.UrlHelper.scala Maven / Gradle / Ivy

There is a newer version: 19.0.7
Show newest version
package com.codacy.client.bitbucket.util

object UrlHelper {

  def joinQueryParameters(baseUrl: String, queryParameters: String*): String = {
    val parameters = queryParameters.mkString("&")
    if (parameters.nonEmpty) {
      baseUrl match {
        case url if url.contains('?') =>
          url + "&" + parameters
        case url =>
          url + "?" + parameters
      }
    } else {
      baseUrl
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy