Insomnia-Script-SDK-Docs
    Preparing search index...

    Class RequestInfo

    Index

    Constructors

    • Constructs a new instance of the RequestInfo class.

      Parameters

      • options: RequestInfoOption

        An object containing initialization options for the request information.

        Represents options for creating a request information instance.

        • OptionaleventName?: EventName

          The name of the event associated with the request, if any.

        • Optionaliteration?: number

          The current iteration number of the request, if applicable.

        • OptionaliterationCount?: number

          The total number of iterations for the request, if applicable.

        • OptionalrequestId?: string

          The unique identifier of the request, if specified.

        • OptionalrequestName?: string

          The name of the request, if specified.

      Returns RequestInfo

    Properties

    eventName: EventName

    The name of the event associated with the request. It could be 'prerequest` or 'test'.

    iteration: number

    The current iteration number of the request execution. This value represents how many times the request has been executed in a loop or sequence.

    iterationCount: number

    The number of iterations that have been executed. This property tracks how many times a specific operation or process has been repeated.

    requestId: string

    The unique identifier for the request.

    requestName: string

    The name of the request. This property holds the user-defined name for the request, which can be used to identify or reference the request within the application.

    Methods

    • Converts the current instance of the object into a plain JavaScript object.

      Returns {
          eventName: EventName;
          iteration: number;
          iterationCount: number;
          requestId: string;
          requestName: string;
      }

      An object containing the following properties:

      • eventName: The name of the event associated with the request.
      • iteration: The current iteration number of the request.
      • iterationCount: The total number of iterations for the request.
      • requestName: The name of the request.
      • requestId: The unique identifier of the request.