API. I’m making calls to their endpoints using requests, and I’m frequently getting incomplete responses, even though the status code is always 200. The response body is often truncated, and this happens across different environments (local + VMs + GCP Cloud Run Jobs).
I suspect it’s an issue on Exact’s side, but just wanted to check—has anyone else encountered something like this? Thanks!
cab you give us a dump of reques and response headers?
no, but its a regular GET request, and status code is 200, content lenght is the expected lenght
This might be dumb, but you could try sending the request through Curl. Check the response and then analyze what's going on with requests lib in python.
yes, this is my next step.... I'm going to use postman
Ah gotchu. https://blog.petrzemek.net/2018/04/22/on-incomplete-http-reads-and-the-requests-library-in-python/ Do check if content-length is present Check this as well: https://stackoverflow.com/questions/49064398/requests-exceptions-chunkedencodingerror-connection-broken-incompleteread0
content length is, and is the expected lenght
stackoverflow issue is with py2, too old
Just check if you're sending requests without closing. Ig using the requests inside 'with' should be helpful
Обсуждают сегодня