post-xml tagged requests and articles

Categorized request examples and articles tagged with [post-xml] keyword
How to post XML with the correct Content-Type header?
To post XML to the server{{ using LANG}}, you need to make an HTTP POST request, include the XML data in the body of the POST request message, and set the correct MIME type for the XML using the "Content-Type: application/xml" HTML header. Optionally, you can send an "Accept: application/xml" request header that will tell the server that the client is expecting XML in response. The server specifies the data type in the response using the "Content-Type: application/xml" HTTP response header. In this {{LANG}} Post XML Example, we send a request with XML data to the ReqBin echo URL and pass the Content-Type: application/xml HTML header. Click Send to execute the {{LANG}} POST XML example online and see the results.

How do I post XML using Curl?
To post XML using Curl, you need to pass XML data to Curl with the -d command line option 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.

How do I get XML using Curl?
To retrieve an XML from the server using Curl, you need to pass the target URL to Curl along with the -H "Accept: application/xml" command line option. The -H command line switch sends an Accept: application/xml header to the server and tells the server that the Curl client expects an XML response. Without this header, the server may automatically select a different data type for the response and return the data in a different format than XML. In this Curl GET XML Example, we send a request to the ReqBin echo URL with the required HTTP header. Click Run to execute the Curl GET XML request online and see the result.

SOAP API Testing Tool
Online SOAP API testing tool for API developers and testers. Test your SOAP API by making API calls directly from your browser.