Reputation: 4160
Is it possible to send back a response only with status code 204 and no body message?
With this for example you always send back a json:
response()->json($data, $code);
Upvotes: 1
Views: 1851
Reputation: 939
204 reponses do NOT have bodies.
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#2xx_Success
Try responding like response(null, 204) -- not tested but it should work
Upvotes: 1