I am currently implementing code to call out to an API where the post request body needs to contain several columns of data in csv format.
e.g.
Col1, Col2, Col3
1, 2, 3
4, 5, 6
etc, with the content type header is set to 'text/csv'
How do I directly write to the request body?
I have a coworker who is doing the same thing as I am in Java and the Apache httpclient lib simply has a setRequestBody method.
Is there something similar in httplib, urllib (1,2) or pyCurl? Thanks.