REST API and post requests
I'm trying to copy a build configuration using the rest api.
I'm using the uri
http://teamcity:8111/httpAuth/app/rest/projects
and posting xml
<newProjectDescription name='Project Name' sourceProjectLocator='id:project2' copyAllAssociatedSettings='true' shareVCSRoots='false'/>
as per the api.
I however get back a 'unsuspported media type'.
I'm setting the content_type header to 'text/xml'
I have also tried with and without the '<?xml version='1.0'?>
Can you tell me exactly what is required please.
Please sign in to leave a comment.
Figured it out needed 'application/xml'.