JSON return from a RESTful Query of TeamCity

Viewed 6467

As per Teamcity REST API

We can use the following to get XML Data

curl -v --basic --user USERNAME:PASSWORD --request POST "http://teamcity:8111/httpAuth/app/rest/users/" --data @data.xml --header "Content-Type: application/xml"

Can we do the same for JSON ?

 curl -v --basic --user USERNAME:PASSWORD --request POST "http://teamcity:8111/httpAuth/app/rest/users/" --data @data.json --header "Content-Type: application/json"

BOTH, return

HTTP/1.1 200 OK
Date: Sun, 05 Aug 2012 02:18:36 GMT
Server: Apache-Coyote/1.1
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Cache-Control: no-store
Content-Type: application/xml

Thus , Content-Type: xml

How can i get JSON Reponse.

1 Answers
Related