Skip to content

Commit

Permalink
Update request.py in order to allow Streaming responses
Browse files Browse the repository at this point in the history
(Example : needed to build correct ChatGPT XBlocks)
  • Loading branch information
TheoBessel authored Apr 11, 2024
1 parent 6f8d84e commit 554aa6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xblock/django/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
from lazy import lazy

import webob
from django.http import HttpResponse
from django.http import StreamingHttpResponse
from webob.multidict import MultiDict, NestedMultiDict, NoVars


def webob_to_django_response(webob_response):
"""Returns a django response to the `webob_response`"""
django_response = HttpResponse(
django_response = StreamingHttpResponse(
webob_response.app_iter,
content_type=webob_response.content_type,
status=webob_response.status_code,
Expand Down

0 comments on commit 554aa6a

Please sign in to comment.