code: private static String getUrl(int method, String baseUrl, String endpoint, Map<String, String> params) {
  		if (params != null) {
  			for (Map.Entry<String, String> entry : params.entrySet()) {
  				if (entry.getValue() == null || entry.getValue().equals("null")) {
  					entry.setValue("");
  				}
  			}
  		}
  
  		if (method == Method.GET && params != null && !params.isEmpty()) {
  			final StringBuilder result = new StringBuilder(baseUrl + endpoint);
  			final int startLength = result.length();
  			for (String key : params.keySet()) {
  				try {
  					final String encodedKey = URLEncoder.encode(key, "UTF-8");
  					final String encodedValue = URLEncoder.encode(params.get(key), "UTF-8");
  					if (result.length() > startLength) {
  						result.append("&");
  					} else {
  						result.append("?");
  					}
  					result.append(encodedKey);
  					result.append("=");
  					result.append(encodedValue);
  				} catch (Exception e) { }
  			}
  			return result.toString();
  		} else {
  			return baseUrl + endpoint;
  		}
  	}
docs: Converts a base URL, endpoint, and parameters into a full URL
  
  @param method The {@link com.android.volley.Request.Method} of the URL
  @param baseUrl The base URL
  @param endpoint The endpoint being hit
  @param params The parameters to be appended to the URL if a GET method is used
  
  @return The full URL