Added convenience method for sending JSON
This commit is contained in:
parent
45b7186e0c
commit
d120749cde
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user