Java
Chilkat2 Java
Example: Http.GetUrlPath method
Demonstrates theGetUrlPath method.
Chilkat Java Downloads
import com.chilkatsoft.chilkat2.Http;
public class ChilkatExample {
public static void main(String[] args) {
Http http = new Http();
String url = "https://example.com/folder/page?lang=en&sort=asc#section2";
System.out.println(http.getUrlPath(url));
// Output:
// /folder/page
}
}