<div dir="ltr"><div>Hi All ,</div><div><br></div><div>Now the command for put request has been successful .the content type for the header needs to be text/plain.</div><div>I thought that the datatype for the data parameters would determine the content type of the header.</div><div><br></div><div>For ex : In this case the data is passed in the following format <b>'{"secret": {"payload": "secretput", "payload_content_type": "text/plain }}' which is the JSON type .</b></div><div> </div><div>curl -X PUT -H 'content-type:text/plain' -H 'X-Project-Id: 12345' -d <b>'{"secret": {"payload": "secretput", "payload_content_type": "text/plain }}' </b><a href="http://localhost:9311/v1/secrets/89d424c3-f4c1-4822-8bd7-7691f40f7ba3">http://localhost:9311/v1/secrets/89d424c3-f4c1-4822-8bd7-7691f40f7ba3</a></div><div><br></div><div>Could anyone provide the clarity on content type of the header</div><div><br></div><div>Thanks and Regards,</div><div>Asha Seshagiri</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 20, 2015 at 2:05 PM, Asha Seshagiri <span dir="ltr"><<a href="mailto:asha.seshagiri@gmail.com" target="_blank">asha.seshagiri@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi All ,</div><div><br></div><div>I am unable to send the PUT request using the CURL command for storing the secret .</div><div><br></div><div><br></div><div>root@barbican:~# curl -X POST -H 'content-type:application/json' -H 'X-Project-Id: 12345' -d '{"secret": {"name": "secretname", "algorithm": "aes", "bit_length" : 256, "mode": "cbc"}}' <a href="http://localhost:9311/v1/secrets" target="_blank">http://localhost:9311/v1/secrets</a></div><div><div>{"secret_ref": "<a href="http://localhost:9311/v1/secrets/84aaac35-daa9-4ffb-b03e-18596729705d" target="_blank">http://localhost:9311/v1/secrets/84aaac35-daa9-4ffb-b03e-18596729705d</a>"}</div></div><div><br></div><div><div>curl -X PUT -H 'content-type:application/json' -H 'X-Project-Id: 12345' -d '{"secret": {"payload": "secretput", "payload_content_type": "text/plain" }}' <a href="http://localhost:9311/v1/secrets" target="_blank">http://localhost:9311/v1/secrets</a></div><div><b>{"code": 405, "description": "", "title": "Method Not Allowed"}</b></div></div><div><br></div><div>It would be great if some one could help me .</div><div>Thanks in advance.</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div><div><em>Thanks and Regards,</em></div>
<div><em>Asha Seshagiri</em></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div><em>Thanks and Regards,</em></div>
<div><em>Asha Seshagiri</em></div></div>
</div></div>