Zum Hauptinhalt springen

Interface: FeaturePairDetector

If a requesting system only supports one URL for multiple actions (For example when using a ?action parameter) you can implement this interface for helping soda sync detecting the feature pair.

Methods

detect

detect(request): [keyof AppFeatureMapping, keyof AppFeatureMapping]

Detect the feature based on the incoming http request.

Parameters

NameType
requestObject
request.body?string
request.headers?Record<string, string>
request.method?string
request.url?string

Returns

[keyof AppFeatureMapping, keyof AppFeatureMapping]

The first element of the return value is the source feature (for example orders-request) and the second element is the target feature (for example orders-provide). Null is returned if the feature pair could not be detected.

Defined in

src/contracts/common/handler/feature-pair-detector.ts:15