Skip to content

Commit 7d67d13

Browse files
Add network.setCacheDisabled
Signed-off-by: Francis Bouvier <[email protected]>
1 parent 1929eed commit 7d67d13

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/cdp/network.zig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const stringify = cdp.stringify;
99

1010
const NetworkMethods = enum {
1111
enable,
12+
setCacheDisabled,
1213
};
1314

1415
pub fn network(
@@ -23,6 +24,7 @@ pub fn network(
2324

2425
return switch (method) {
2526
.enable => networkEnable(alloc, id, scanner, ctx),
27+
.setCacheDisabled => networkSetCacheDisabled(alloc, id, scanner, ctx),
2628
};
2729
}
2830

@@ -36,3 +38,14 @@ fn networkEnable(
3638

3739
return result(alloc, id orelse msg.id.?, null, null, msg.sessionID);
3840
}
41+
42+
fn networkSetCacheDisabled(
43+
alloc: std.mem.Allocator,
44+
id: ?u16,
45+
scanner: *std.json.Scanner,
46+
_: *Ctx,
47+
) ![]const u8 {
48+
const msg = try getMsg(alloc, void, scanner);
49+
50+
return result(alloc, id orelse msg.id.?, null, null, msg.sessionID);
51+
}

0 commit comments

Comments
 (0)