You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HttpFoundation bietet auch eine JsonResponse.
Statt new Response(json_encode($array)) kann man also new JsonResponse($array) nutzen. Da wird dann auch gleich der Content-Type auf json gesetzt.