File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,10 @@ public function noContent($code = self::HTTP_NO_CONTENT)
6767 * Bind an item to a transformer and start building a response.
6868 * @param $item
6969 * @param int $statusCode
70+ * @param bool $replaceHeaders
7071 * @return ApiResponse
7172 */
72- public function item ($ item , $ statusCode = null )
73+ public function item ($ item , $ statusCode = null , $ replaceHeaders = true )
7374 {
7475 if ($ this ->transformer ) {
7576 $ item = $ this ->transformer ->transformItem ($ item , $ this ->getTransformerOptions ());
@@ -84,7 +85,7 @@ public function item($item, $statusCode = null)
8485 }
8586
8687 return $ this
87- ->header ('Content-Type ' , 'application/json ' )
88+ ->header ('Content-Type ' , 'application/json ' , $ replaceHeaders )
8889 ->setContent ($ this ->encode ($ item ))
8990 ->setStatusCode ($ statusCode );
9091 }
You can’t perform that action at this time.
0 commit comments