Added convenience method for sending JSON

This commit is contained in:
Ben Ashton 2022-10-16 15:05:43 -06:00
parent 45b7186e0c
commit d120749cde

View File

@ -206,6 +206,11 @@ function send() {
_sendRaw _sendRaw
} }
function sendJson() {
setHeader 'Content-Type' 'application/json'
send
}
# $1: Path # $1: Path
function redirect() { function redirect() {
local path="$1" local path="$1"