Mocky Balboa API Reference
    Preparing search index...

    Interface FulfillOptions

    Options when fulfilling a route

    interface FulfillOptions {
        body?: string;
        headers?: Record<string, string>;
        path?: string;
        response?: Response;
        status?: number;
    }
    Index

    Properties

    body?: string

    Body to set on the response, overrides any body set on FulfillOptions.response

    empty string
    
    headers?: Record<string, string>

    Headers to set on the response, overrides any headers set on FulfillOptions.response

    path?: string

    File path to use for the response body. The contents of the file will be loaded on the server and the content-type will be detected based on the file extension. Ensure you pass an absolute path to the file.

    If you specify a content-type header on your own, the mime-type detection will be skipped.

    undefined
    
    response?: Response

    Optional response, if not set a default empty response will be used

    status?: number

    Status code to set on the response, overrides any status code set on FulfillOptions.response

    200