Use case
I want to output only an Image with Ocsigen, with the "image" content-type send by the server. I have the path of the image I want to output.Realisation
open Lwt open XHTML.M open Eliom_services open Eliom_parameters open Eliom_sessions open Eliom_predefmod.Xhtml open Eliom_predefmod.Files let photo_service = Eliom_services.new_service ~path:["photo"] ~get_params:Eliom_parameters.unit () let photo_handler = Eliom_predefmod.Any.register photo_service (fun sp () () -> Eliom_predefmod.Files.send ~sp:sp "rakotomandimby-logo.png")And that's all.