pitrou commented on code in PR #31:
URL: https://github.com/apache/arrow-experiments/pull/31#discussion_r1727324198
##########
http/get_simple/python/client/client.py:
##########
@@ -19,14 +19,18 @@
import pyarrow as pa
import time
+ARROW_STREAM_FORMAT = 'application/vnd.apache.arrow.stream'
+
start_time = time.time()
-with urllib.request.urlopen('http://localhost:8008') as response:
- buffer = response.read()
+response = urllib.request.urlopen('http://localhost:8008')
+content_type = response.headers['Content-Type']
+if content_type != ARROW_STREAM_FORMAT:
+ raise ValueError(f"Expected {ARROW_STREAM_FORMAT}, got {content_type}")
Review Comment:
Unrelated, but should ideally reformat this file to use 4-spaces indentation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]