How do I post XML to the server? [Curl/Bash Code]

To post XML data to the server, you need to make an HTTP POST request, include the XML in the body of the request message, and set the correct MIME type for the XML. The correct MIME type for XML is application/xml. In this post XML example, the Content-Type: application/xml request header specifies the resource's media type as XML. The Accept: application/xml request header tells the server that the client is expecting XML, and the Content-Type: application/xml response header indicates that the server returned XML. The Curl/Bash code was automatically generated for the POST XML example.
Loading...