Get the number of elapsed milliseconds since this request was created.
Returns number
The number of milliseconds since this request was made.
getId
getId(): string
Get this request's ID.
Returns string
The ID.
getPromise
getPromise(): Promise<unknown>
Retrieve a promise for this request which will be resolved/rejected when the
respective methods are called on this Request.
Returns Promise<unknown>
A promise
outcomeFrom
outcomeFrom(promise): Promise<void>
Resolve or reject the promise depending on the outcome of this promise.
Parameters
promise: Promise<unknown>
The promise whose resolution determines the outcome of this
request.
Returns Promise<void>
reject
reject(msg): void
Reject a request. This should be invoked for requests which failed to be
processed correctly.
Parameters
msg: unknown
The thing to reject with.
Returns void
resolve
resolve(msg): void
Resolve a request. This should be invoked for the successful processing
of this request. This doesn't necessarily mean that the request was sent
through, e.g. suppressing AS virtual users' messages is still a success.
Construct a new Request.