Sample code for 30+ languages & platforms
Ruby

Example: Http.GetUrlPath method

Demonstrates the GetUrlPath method.

Chilkat Ruby Downloads

Ruby
require 'chilkat'

success = false

http = Chilkat::CkHttp.new()
url = "https://example.com/folder/page?lang=en&sort=asc#section2"
print http.getUrlPath(url) + "\n";

# Output:

# /folder/page