Skip to content
HttpRespondWithFile

HttpRespondWithFile

Description

Populate response from a file on disk. The file’s bytes are read through response->allocator. Only available when the file feature is enabled.

Success

Returns response with body filled.

Failure

Returns NULL on I/O or allocation failure.

Usage example (Cross-references)

Usage examples (Cross-references)
    
    #if MISRA_HAVE_FILE
    HttpResponse *HttpRespondWithFile(
        HttpResponse    *response,
        HttpResponseCode status,
Last updated on