summaryrefslogtreecommitdiff
path: root/static/classes
diff options
context:
space:
mode:
Diffstat (limited to 'static/classes')
-rwxr-xr-xstatic/classes/Response.class.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php
index cd9229b..a4e19b5 100755
--- a/static/classes/Response.class.php
+++ b/static/classes/Response.class.php
@@ -50,8 +50,9 @@ class Response
$this->type = $response_type;
break;
default:
- http_response_code(400);
- echo 'Invalid response type. Valid options are: csv, html, json, text.';
+ header('Content-Type: application/json; charset=UTF-8');
+ $this->type = 'json';
+ $this->error(400, 'Invalid response type. Valid options are: csv, html, json, text.');
break;
}
}