hylar/server/controller.js
function(req, res) {
        if (req.headers.accept == 'application/json') {
            res.header('Content-Type', 'application/json');
            res.status(200).json({
                data: {
                    ontologyTxt: req.rawOntology,
                    mimeType: req.mimeType
                },
                requestDelay: req.requestDelay,
                serverTime: new Date().getTime()
            });
        } else {
            res.header('Content-Type', req.mimeType);
            res.status(200).send(req.rawOntology);
        }
    }
function(req, res) {
        if (req.headers.accept == 'application/json') {
            res.header('Content-Type', 'application/json');
            res.status(200).json({
                data: {
                    ontologyTxt: req.rawOntology,
                    mimeType: req.mimeType
                },
                requestDelay: req.requestDelay,
                serverTime: new Date().getTime()
            });
        } else {
            res.header('Content-Type', req.mimeType);
            res.status(200).send(req.rawOntology);
        }
    }
function ( req , res ) { if ( req . headers . accept == 'application/json' ) { res . header ( 'Content-Type' , 'application/json' ) ; res . status ( 200 ) . json ( { data : { ontologyTxt : req . rawOntology , mimeType : req . mimeType } , requestDelay : req . requestDelay , serverTime : new Date ( ) . getTime ( ) } ) ; } else { res . header ( 'Content-Type' , req . mimeType ) ; res . status ( 200 ) . send ( req . rawOntology ) ; } }
End-method returning an ontology
@param req
@param res
End - method returning an ontology