I\'m trying to write the output of an API \'get\' request to a file. I know the function works as the output of the request is returned successfully and in full in shell.