How can I perform a PUT ReST call for updating FHIR resource

How can I perform a PUT ReST call for updating FHIR resource

I tried doing a POST in FHIR DB (http://test.fhir.org/r3) but when I applied a PUT operation for updating patient resource, it retruned an error back.

Can you suggest if there is some header information which has to be added along with URL for updating patient resource without creating a new one

What was the error message?

And what URL did you PUT the resource to?