PhantomJsCloud Automation API
    Preparing search index...

    Class HTTPRequest

    A request of the page, as given to a Page.waitForRequest predicate and returned by HTTPResponse.request. Every member is a synchronous method. Body reads and request interception (abort, continue, respond) are not available.

    await page.waitForRequest((req) => req.method() === "POST" && req.url().includes("/api/"));
    
    Index
    • { errorText } when the request failed, else undefined.

      Returns { errorText: string }

    • The request headers (lower-case names).

      Returns Record<string, string>

    • Whether the request drives a frame's navigation.

      Returns boolean

    • The HTTP method ("GET", "POST", ...).

      Returns string

    • The request body text, or undefined.

      Returns string

    • The plain summary object behind these methods.

      Returns Request

    • The request url.

      Returns string