Sample code for 30+ languages & platforms
Zig

Example: Http.GetUrlPath method

Demonstrates the GetUrlPath method.

Chilkat Zig Downloads

Zig
const std = @import("std");
const chilkat = @import("chilkat");

pub fn main(init: std.process.Init) !void {
    const alloc = init.arena.allocator();

    const http = try chilkat.Http.init();
    defer http.deinit();
    const url = "https://example.com/folder/page?lang=en&sort=asc#section2";
    std.debug.print("{s}\n", .{try http.getUrlPath(alloc, url)});

    // Output:

    // /folder/page
}