Practice ยท 2 of 4
The POST That Carries Its Headers
CHALLENGE
Difficulty: intermediate+25 XP
Implement PostJsonAsync: POST the given JSON body to the path with Content-Type application/json and header X-Trace: <traceId>. The stub records the request โ verify method, path, content-type header, and the X-Trace header all arrived.
``csharp
static Task PostJsonAsync(HttpClient http, string path, string json, string traceId, CancellationToken ct = default);
``
Press Submit to check your solution.
Back to lesson: Practice: HTTP Practice: Handlers, Outcomes, Retries