refactor async curl command string to be more readable
add new createTempFile method and update curl command to send the temp file instead of a string in order to resolve issues with data that is not properly escaped