palace library
Classes
- BodyParser
-
will parse the incoming request so if
json
req.body
type will beMap
and so on - COLORS
- CorsGuard
- EndPoint
-
every
request
must have aendpoint
ready to handle it else thepalace
will respond with404
each endpoint has its ownmethod
- LogsGuard
- Palace
- Request
-
- contains simplified logic to extract data from the io req class
- Response
-
- contains getters and logic to respond to incoming req
Extensions
- RedirectTheRequest on Response
- ResponseWithAccepted on Response
- status code 202
- ResponseWithBadRequest on Response
- status code 400
- ResponseWithCreated on Response
- status code 201
- ResponseWithFile on Response
- ResponseWithInternalServerError on Response
- ResponseWithJson on Response
- ResponseWithNotFound on Response
- ResponseWithOk on Response
- status code 200
- ResponseWithView on Response
Functions
-
getFileContentType(
File file) → ContentType? -
getFileMimeType(
File file) → String? -
getFileName(
File file) → String -
validateDto(
Object dto) → List< String> - takes dto and return list of faliure errors message
-
yaml<
T> (String key) → Future< T?> - load and extract yaml file attribute by the parent key