I am currently using Python perform a POST to a desired url and upload an in memory csv file:
Python code:
csv_content = 'some,fake,single,row,csv\r\n'
requests.post(
'http://some.location.com',
files={'form_field_name': ('file_name.csv', csv_content, 'text/csv')},
# implicit "multipart/form-data" content-type header
)
The Python code works well, but I really want to use curl to perform the action.
What I have: (I know it is missing a lot, I tried variations of
curl -X POST http://some.location.com -H "Content-Type: text/csv"
- I am not sure the header is good
- Not sure how to specify the data, as
-dwould not be enough - I want to add a file name as well