Skip to content

Commit

Permalink
updated bindataformpost example
Browse files Browse the repository at this point in the history
  • Loading branch information
renerocksai committed Sep 12, 2023
1 parent a2776aa commit 5adf7d0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/bindataformpost/bindataformpost.zig
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ const Handler = struct {
},
else => {
// might be a string param, we don't care
// let's just get it as string
if (r.getParamStr(kv.key.str, Handler.alloc, false)) |maybe_str| {
const value: []const u8 = if (maybe_str) |s| s.str else "(no value)";
std.log.debug(" {s} = {s}", .{ kv.key.str, value });
} else |err| {
std.log.err("Error: {any}\n", .{err});
}
},
}
}
Expand Down

0 comments on commit 5adf7d0

Please sign in to comment.