I have a Python(Version 2.6.6) script like Below:
import subprocess
id = 834
urllink = "https://xyzm:8443/rest/import-job/" + str(id)
subprocess.call([
'curl',
'-k',
'-u',
'xxxx:abc',
'-X',
'GET',
urllink
])
It returns some JSON output to the terminal. How can I redirect the output to a file, so that I can parse the file and use the same file(data) while executing a POST command?
Any reply would be greatly appreciated.
Thanks, Jee
curl -ku xxxx:abc -X GET https://xyzm:8443/rest/import-job/834 >yourfile.txt?