vapor-ware / synse-client-python

Python client for interacting with Synse Server
https://synse-client-python.readthedocs.io
GNU General Public License v3.0
1 stars 0 forks source link

get readcache working with v3 http client #22

Closed edaniszewski closed 5 years ago

edaniszewski commented 5 years ago

with the move over to aiohttp over requests, support for readcache was deferred since its a bit different than the rest and needed more research. I've started to implement it, but am unable to get it working. It seems like its an issue with how sanic/httptools (underlying lib) handles the incoming request.. this may have been introduced in sanic 19.6.0. I tried with an older version of sanic and managed to get a response (I got data, but it didn't appear to be streamed), so I'm thinking that its an issue w/ sanic. I could also be issuing the request incorrectly. I'll spend more time thinking on this one.

edaniszewski commented 5 years ago

I think this is actually a bug in synse server for streamed http responses.. the streamer function just packs a bunch of json in with no real delimiter. In a boiled down simple example I created for testing, just added a newline as a delimiter between values made things just work.

I'll try that for synse server. if it works, then I'm left with the age-old question of how it ever even worked before.

edaniszewski commented 5 years ago

well, its partially the above and partially because I was misusing the aiohttp client method..