File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
python/ql/test/library-tests/frameworks/aiohttp Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,18 @@ async def file_response(request): # $ requestHandler
76
76
resp = web .FileResponse (path = filename ) # $ HttpResponse mimetype=application/octet-stream MISSING: getAPathArgument=filename
77
77
return resp
78
78
79
+
80
+ @routes .get ("/streaming_response" ) # $ routeSetup="/streaming_response"
81
+ async def streaming_response (request ): # $ requestHandler
82
+ resp = web .StreamResponse () # $ HttpResponse mimetype=application/octet-stream
83
+ await resp .prepare (request )
84
+
85
+ await resp .write (b"foo" ) # $ MISSING: responseBody=b"foo"
86
+ await resp .write (data = b"bar" ) # $ MISSING: responseBody=b"bar"
87
+ await resp .write_eof (b"baz" ) # $ MISSING: responseBody=b"bar"
88
+
89
+ return resp
90
+
79
91
################################################################################
80
92
# Cookies
81
93
################################################################################
You can’t perform that action at this time.
0 commit comments