Django - REST Framework Basics
Given this Django view code, what will be the HTTP response content?
And the client sends JSON body:
from django.http import JsonResponse
import json
def my_view(request):
data = json.loads(request.body)
result = {"message": f"Hello, {data['name']}!"}
return JsonResponse(result)And the client sends JSON body:
{"name": "Alice"}