HTTP Protocol Guide

Best practices for API load and response correlation scenarios.

API Resilience

Capture status code distributions and latency bands under sustained load.

Feature Usage Samples

How to use snippets for HTTP Protocol Guide.

Switch between C#, Java, Python, TypeScript, and JavaScript to see the native SDK shape for this sample.

Licensing note: every runnable sample requires a valid runner key via WithRunnerKey("...") or config key LoadStrike:RunnerKey.

HTTP Step

var step = await LoadStrikeStep.Run<string>("GET /health", context, async () =>
{
    var response = await client.GetAsync("https://example.com/health");
    return response.IsSuccessStatusCode
        ? LoadStrikeResponse.Ok<string>(statusCode: ((int)response.StatusCode).ToString())
        : LoadStrikeResponse.Fail<string>(statusCode: ((int)response.StatusCode).ToString());
});

Goal

Status codes

Capture the exact HTTP outcome code so success and failure percentages are visible in reports and sinks.

Latency

Measure the end-to-end request latency for the step under the configured load shape.

Diagram

Protocol stack diagram
Protocol adapters normalize tracking and correlation across heterogeneous transports.