Network

goto.mjs

@mr_ozio/scraper-utils · v2.5.0 · Generated April 21, 2026

Target Style

Target Style

2 exports

const

fetchPage

Target Style
export const fetchPage = async ({ at, proxy } = {}) => {

Fetches a page and returns both body and status.

Target style API. Preferred for new code.

Parameters

  • options{ at: string, proxy?: string }

Returns

Promise<{ body: string, status: number }>

Example

const page = await fetchPage({
  at: 'https://example.com',
})

const

readPage

Target Style
export const readPage = async ({ at, proxy } = {}) => {

Reads only the page body from a URL.

Target style API. Preferred for new code.

Parameters

  • options{ at: string, proxy?: string }

Returns

Promise<string>

Example

const html = await readPage({
  at: 'https://example.com',
})

Legacy Style

Legacy Style

1 exports

const

goto

Legacy Style
export const goto = async (url, proxy) => {

No description provided.

Legacy API. Kept for older code and not the preferred choice for new code.