How do I post XML using cURL? [Python Code]

To post XML using cURL, you need to pass XML data to cURL with the -d command line parameter and specify the data type in the body of the POST request message using the -H Content-Type: application/xml command line parameter. In this cURL POST XML example, we also pass the Accept: application/xml request header to tell the server that the cURL client expects XML from the server. Click Run to execute the cURL POST XML example online and see the results. The Python code was automatically generated for the Curl POST XML example.
Loading...