xk6-crawler
    Preparing search index...

    Interface Request

    The representation of a HTTP request

    interface Request {
        ctx: Context;
        depth: number;
        headers: Header;
        id: number;
        method: string;
        proxy_url: string;
        response_character_encoding: string;
        url: string;
        visit(url: string): void;
    }
    Index

    Properties

    ctx: Context

    ctx is a context between a Request and a Response.

    depth: number

    The number of the parents of the request.

    headers: Header

    Contains the Request's HTTP headers.

    id: number

    The Unique identifier of the request.

    method: string

    The HTTP method of the request

    proxy_url: string

    The proxy address that handles the request

    response_character_encoding: string

    The character encoding of the response body. Leave it blank to allow automatic character encoding of the response body. It is empty by default and it can be set in onRequest callback.

    url: string

    URL of the HTTP request.

    Methods

    • Visit continues Crawler's collecting job by creating a request and preserves the Context of the previous request. Visit also calls the previously provided callbacks.

      Parameters

      • url: string

        URL to visit

      Returns void