C# Class GuaranteedRate.Net.RequestStitching.MessageHandlers.RequestStitchingMessageHandler

Inheritance: System.Net.Http.DelegatingHandler
Afficher le fichier Open project: Guaranteed-Rate/Net.RequestStiching

Méthodes publiques

Méthode Description
RequestStitchingMessageHandler ( bool generateIfMissing ) : System

Extracts X-Session-Id and X-Request-Id from request header and stores them in the current HTTP context. Adds X-Session-Id and X-Request-Id to the response header.

Use RequestContext.RequestId and RequestContext.SessionId to retrieve the values.

Méthodes protégées

Méthode Description
SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task

Private Methods

Méthode Description
SetResponseHeader ( HttpResponseMessage response, RequestHeader requestHeader, string value ) : void
StitchRequestHeader ( HttpRequestMessage request, RequestHeader requestHeader ) : string

Method Details

RequestStitchingMessageHandler() public méthode

Extracts X-Session-Id and X-Request-Id from request header and stores them in the current HTTP context. Adds X-Session-Id and X-Request-Id to the response header.
Use RequestContext.RequestId and RequestContext.SessionId to retrieve the values.
public RequestStitchingMessageHandler ( bool generateIfMissing ) : System
generateIfMissing bool Sends a Bad Request response if X-Request-Id and X-Session-Id are not include in the request header
Résultat System

SendAsync() protected méthode

protected SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task
request System.Net.Http.HttpRequestMessage
cancellationToken System.Threading.CancellationToken
Résultat Task