Java
Java
Example: Http.GetUrlPath method
Demonstrates theGetUrlPath method.
Chilkat Java Downloads
import com.chilkatsoft.*;
public class ChilkatExample {
static {
try {
System.loadLibrary("chilkat");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
}
public static void main(String argv[])
{
boolean success = false;
CkHttp http = new CkHttp();
String url = "https://example.com/folder/page?lang=en&sort=asc#section2";
System.out.println(http.getUrlPath(url));
// Output:
// /folder/page
}
}