atproto pds in zig pds.zat.dev
pds atproto
24

Configure Feed

Select the types of activity you want to include in your feed.

Template API curl examples with PDS URL

zzstoatzz (Jun 1, 2026, 7:56 PM -0500) 4733dc36 527063c3

+3 -2
+3 -2
src/http/docs.zig
··· 179 179 fn renderCurl(allocator: std.mem.Allocator, writer: *std.Io.Writer, endpoint: Endpoint) !void { 180 180 const token = if (std.mem.indexOf(u8, endpoint.auth, "bearer") != null or std.mem.indexOf(u8, endpoint.auth, "service") != null) " \\\n -H 'authorization: Bearer $TOKEN'" else ""; 181 181 const body = if (std.mem.eql(u8, endpoint.method, "POST")) " \\\n -H 'content-type: application/json' \\\n --data '{}'" else ""; 182 + const public_url = try escapeHtml(allocator, config.publicUrl()); 182 183 try writer.print( 183 - "<pre><code>curl -sS -X {s}{s} \"$PDS{s}\"{s}</code></pre>", 184 - .{ try escapeHtml(allocator, endpoint.method), token, try escapeHtml(allocator, endpoint.path), body }, 184 + "<pre><code>curl -sS -X {s}{s} \"{s}{s}\"{s}</code></pre>", 185 + .{ try escapeHtml(allocator, endpoint.method), token, public_url, try escapeHtml(allocator, endpoint.path), body }, 185 186 ); 186 187 } 187 188