此内容没有您所选择的语言版本。
2.6. Response Type
Although OpenShift supports both XML and JSON response formats, the default server response is the JSON syntax. Include the following HTTP header to receive the response in XML:
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
Accept: application/xml
Accept: application/xml
Using Ruby
headers = {"Accept" => "application/xml"}
headers = {"Accept" => "application/xml"}
Using Python
request.add_header("Accept", "application/xml")
request.add_header("Accept", "application/xml")
Using cURL
curl "https://openshift.redhat.com/broker/rest/api" -H "Accept: application/xml"
curl "https://openshift.redhat.com/broker/rest/api" -H "Accept: application/xml"