Skip to main content

HeaderGenerator

Generates realistic looking or browser-like HTTP headers.

Index

Methods

get_common_headers

  • Get common HTTP headers ("Accept", "Accept-Language").

    We do not modify the "Accept-Encoding", "Connection" and other headers. They should be included and handled by the HTTP client or browser.


    Returns HttpHeaders

get_random_user_agent_header

get_sec_ch_ua_headers

  • Get the Sec-Ch-Ua headers based on the browser type.


    Parameters

    • optionalkeyword-onlybrowser_type: BrowserType = 'chromium'

    Returns HttpHeaders

get_user_agent_header

  • Get the User-Agent header based on the browser type.


    Parameters

    • optionalkeyword-onlybrowser_type: BrowserType = 'chromium'

    Returns HttpHeaders