Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/response/AphrontJSONResponse.php
| Show All 25 Lines | public function buildResponseString() { | ||||
| $response = $this->encodeJSONForHTTPResponse($this->content); | $response = $this->encodeJSONForHTTPResponse($this->content); | ||||
| if ($this->shouldAddJSONShield()) { | if ($this->shouldAddJSONShield()) { | ||||
| $response = $this->addJSONShield($response); | $response = $this->addJSONShield($response); | ||||
| } | } | ||||
| return $response; | return $response; | ||||
| } | } | ||||
| public function getHeaders() { | public function getHeaders() { | ||||
| $headers = array( | $headers = parent::getHeaders(); | ||||
| array('Content-Type', 'application/json'), | |||||
| ); | $headers[] = array('Content-Type', 'application/json'); | ||||
| $headers = array_merge(parent::getHeaders(), $headers); | |||||
| return $headers; | return $headers; | ||||
| } | } | ||||
| } | } | ||||