Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I'm trying to update defects in quality centre using their REST API from a curl-based script.

So far, I've managed to authenticate, store the cookie, and retrieve a defect's data from QC.

My problems start when I try to send data to update a defect, I always seem to get a 'method unsupported' exception.

My curl command is:

curl -b cookie.txt –T @xml.txt -H "Content-Type: application/xml; Accept: application/xml" http://qcserver/qcbin/rest/domains/DK/projects/R2/defects/74

I'm sending the following xml, just trying to update a standard field at the moment.

<xml version="1.0" encoding="UTF-8" standalone="yes" ?> <Entity Type="defect"><Fields><Field Name="owner"><Value>me</Value></Field></Fields></Entity>

The QC documentation says to use a 'PUT' command, so I've tried sending the XML using the -T curl option but that does not work, so I assume it still needs to be POSTed. Any suggestions gratefully received.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

The curl man page says you need to use "-X PUT" to issue a PUT request.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.