A request pre-processor function.

interface PreProcessor {
    async?: boolean;
    order?: number;
    (params: ProcessorParams): any;
}
  • Parameters

    Returns any

    If a value is returned and the processor is not async then the value is the response. If a Promise is returned and the processor is async, then the processing will wait until the promise resolves. If the promise resolves not to undefined then this is interpreted as the response. If the result is interpreted as response it will be wrapped in a promise.

Properties

Properties

async?: boolean

Indicates that this processors behaves async.

order?: number

Used to manage the order of pre-processors. Default is 0 < 0 means before others

0 means after others

Currently only the MaxURLLengthPre-Processor has a ordering of 100 (should be the last one).