Closed MarkDWilliams closed 2 weeks ago
Seems to be true of the latest PKs endpoint as well. We may want to just set the default encoding to JSON and specify the few places where what we're serving is not JSON (I can't think of any off the top of my head)
maybe we should return JsonResponse(data) instead of HttpResponse(json.dumps(response) cause HttpResponse default to text/html content-type but the JsonResponse automatically serializes the dict to JSON string and changes the content-type to applicatin/json
Yeah, I haven't had a chance to look at how we're doing the encoding. Andrew Su just pointed out that the messages had the wrong encoding header and I figured I'd make a ticket for it before I forgot. I don't think it's an issue that needs to be resolved ASAP, but one we should look into if/when we have some time
@ShervinAbd92 you resolved this one already, right?
The encoding on the
?trace=y
message endpoints appear to be correctly encoded as JSON, but the non-trace endpoint is serving as html/text. Minor issue, but worth fixing.