Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface HTTPSession

Manage a http session

Hierarchy

  • HTTPSession

Implemented by

Index

Methods

afterDownloadRequest

  • afterDownloadRequest(url: URL, downloadPath: string, sessionHttpOptions: HTTPRequestOptions, finalPath: string, bodyRequest?: string, callback?: ProgressCallback): Promise<string>

afterHTTPOptions

afterSuccessfulRequest

afterUnsuccessfulRequest

  • afterUnsuccessfulRequest(err: Error, httpOptions: HTTPRequestOptions, body?: string | Buffer): Promise<Page>

beforeDownloadRequest

  • beforeDownloadRequest(url: URL, downloadPath: string, sessionHttpOptions: HTTPRequestOptions, bodyRequest?: string, callback?: ProgressCallback): Promise<null | string>

beforeRequest

  • It is called before the request, it may be useful to delay. If you return a page, the answer will be the page and there will be no http request If it returns null, the request will continue as normal and if you want to suspend the request, it may generate an error.

    Parameters

    Returns Promise<null | Page>

close

  • close(): void

getURL

  • getURL(path: string): URL

Generated using TypeDoc