In case one has requested that the curl output be transferred to output.txt, then when exactly is the output file created.
I ask this because of the following issue that I am facing:
1. I give an rpc call which has a lot of data to be retrieved.
2, After the date is retrieved, i then go and read output.txt to get all the data i need.
3. But some rpc calls take some time for the data to be retrieved (as lot of data), thus I am not sure how long to wait before i go to read output.txt
4. I don’t wish to give any random number as it would slow down the code.
5. Now i was thinking if output file is created after all the data is received then it woudl be easy as i just need to check for the existence of output.txt and then go an read.
But i am not sure if this is what happens thus i ask this question?
could someone please help me with this issue?
thanks
sunny
You should change your code so that it waits until
curlhas completed. The exact way depends on what language you use.