Skip to content
Advertisement

how do POST API requests use parallel processing in python? requests.exceptions.ConnectionError:

I have code like this:

JavaScript

in file data.json contains 500 records, for example:

JavaScript

in BASE_URL there is data like this:

JavaScript

expected output after POST API:

JavaScript

with my code above, the data that enters the url is only 420 records, even though my data.json is 500 records. how do I solve this so that I post 500 records to url. I don’t know why only 400 data are processed. I have an error like this:

JavaScript

Advertisement

Answer

To get your answer, check your server logs. I suspect bad data and/or server not handling unexpected data gracefully.

Client-Side Check

See if the 80 records are always the same 80 records.

Server-Side Check

Can you find the logs for your server that is running on http://127.0.0.1:3000/employees? It looks like it is running on your same machine. The server’s application or service logs should have the smoking gun.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement