Magpie HTML - v0.1.3
    Preparing search index...

    Interface PluckInit

    Extended RequestInit with pluck-specific options.

    Extends standard fetch RequestInit with additional options for robust web scraping. All standard fetch options are supported.

    interface PluckInit {
        timeout?: number;
        maxRedirects?: number;
        maxSize?: number;
        userAgent?: string;
        throwOnHttpError?: boolean;
        strictContentType?: boolean;
        allowedContentTypes?: string[];
        followRedirects?: boolean;
        validateEncoding?: boolean;
    }

    Hierarchy

    • RequestInit
      • PluckInit
    Index

    Properties

    timeout?: number

    Request timeout in milliseconds.

    30000 (30 seconds)
    
    maxRedirects?: number

    Maximum number of redirects to follow.

    10
    
    maxSize?: number

    Maximum response size in bytes.

    10485760 (10MB)
    
    userAgent?: string

    User-Agent header shortcut.

    Convenience property that sets the User-Agent header. Overrides any User-Agent in the headers object.

    throwOnHttpError?: boolean

    Throw error on HTTP error status (4xx, 5xx).

    true
    
    strictContentType?: boolean

    Validate Content-Type header.

    If true, throws error if Content-Type is not in allowedContentTypes.

    false
    
    allowedContentTypes?: string[]

    Allowed Content-Type values for strictContentType.

    ['text/html', 'text/xml', 'application/xml', 'application/xhtml+xml', 'application/rss+xml', 'application/atom+xml', 'application/json']
    
    followRedirects?: boolean

    Follow redirects automatically.

    If false, returns the 3xx response directly without following.

    true
    
    validateEncoding?: boolean

    Validate detected encoding.

    If true, throws error if detected encoding is invalid or unsupported.

    true