PlatformContext.FromRequest(HttpRequest) Method

Definition

Reads the x-agent-user-id and x-agent-foundry-call-id headers from the HTTP request. Returns Empty when neither header is present.

public static Azure.AI.AgentServer.Core.PlatformContext FromRequest(Microsoft.AspNetCore.Http.HttpRequest request);
static member FromRequest : Microsoft.AspNetCore.Http.HttpRequest -> Azure.AI.AgentServer.Core.PlatformContext
Public Shared Function FromRequest (request As HttpRequest) As PlatformContext

Parameters

request
HttpRequest

The HTTP request to extract headers from.

Returns

A PlatformContext with the extracted values.

Applies to