Type Alias PayloadPreprocessorFunction

PayloadPreprocessorFunction: ((payload: IPayloadData, callback: ((modifiedBuffer: IPayloadData) => void), isSync?: boolean) => void)

Defines the function signature for the Payload Preprocessor.

Type declaration

    • (payload, callback, isSync?): void
    • Parameters

      • payload: IPayloadData

        The Initial constructed payload that if not modified should be passed onto the callback function.

      • callback: ((modifiedBuffer: IPayloadData) => void)

        The preprocessor MUST call the callback function to ensure that the events are sent to the server, failing to call WILL result in dropped events. The modifiedBuffer argument can be either the original payload or may be modified by performing GZipping of the payload and adding the content header.

          • (modifiedBuffer): void
          • Parameters

            Returns void

      • OptionalisSync: boolean

        A boolean flag indicating whether this request was initiated as part of a sync response (unload / flush request), this is for informative only. e.g the preprocessor may wish to not perform any GZip operations if the request was a sync request which is normally called as part of an unload request.

      Returns void

MMNEPVFCICPMFPCPTTAAATR