com.offbytwo.jenkins.client.util.EncodingUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jenkins-client Show documentation
Show all versions of jenkins-client Show documentation
A Jenkins API client for Java
package com.offbytwo.jenkins.client.util;
import com.google.common.net.UrlEscapers;
public final class EncodingUtils {
private EncodingUtils() {
} // nope
public static String encode(String pathPart) {
// jenkins doesn't like the + for space, use %20 instead
String escape = UrlEscapers.urlPathSegmentEscaper().escape(pathPart);
return escape;
}
public static String encodeParam(String pathPart) {
// jenkins doesn't like the + for space, use %20 instead
return UrlEscapers.urlFormParameterEscaper().escape(pathPart);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy