<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">Hi Wenzt,<br><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">According to [1], maybe you should use a &#39;-d&#39; flag since it seems to send the Content-Type.<br><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">Hope it helps.<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small"><br>[1] <a href="https://stackoverflow.com/questions/7172784/how-to-post-json-data-with-curl-from-terminal-commandline-to-test-spring-rest">https://stackoverflow.com/questions/7172784/how-to-post-json-data-with-curl-from-terminal-commandline-to-test-spring-rest</a><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-family:tahoma,sans-serif"><b>Regards,<br></b></span></div><span style="font-family:tahoma,sans-serif"><b>Shani Leviim<br></b></span></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Apr 11, 2018 at 9:19 AM, <a href="mailto:gsswzt@pku.edu.cn">gsswzt@pku.edu.cn</a> <span dir="ltr">&lt;<a href="mailto:gsswzt@pku.edu.cn" target="_blank">gsswzt@pku.edu.cn</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<div>Hi,<span></span></div><div><br></div><div>I wants to creating my own service under ../vms/{vmid}/myservice.Here is my methods:</div><div><br></div><div>1. create VmMytestService in <i><a href="https://github.com/oVirt/ovirt-engine-api-model" target="_blank">https://github.com/oVirt/<wbr>ovirt-engine-api-model</a> project.</i></div><div><span style="color:rgb(0,0,0);font-style:italic;background-color:rgba(0,0,0,0)">    </span><img src="cid:_Foxmail.1@11bbd275-ddef-0e04-de4b-dcaf41bd89eb" style="font-size:10.5pt;line-height:1.5;background-color:transparent" border="0"></div><div><span style="color:rgb(0,0,0);font-size:10.5pt;line-height:1.5;background-color:rgba(0,0,0,0)">    </span><span style="color:rgb(0,0,0);background-color:rgba(0,0,0,0)">add</span><span style="font-style:italic;color:rgb(0,0,0);background-color:rgba(0,0,0,0)"> </span><span style="background-color:transparent"><i>@Service VmMytestService mytests() in </i>VmService .java </span></div><div><span style="color:rgb(0,0,0);background-color:rgba(0,0,0,0)">    </span></div><div>2. mvn install it and change the root pom.xml <i>&lt;model.version&gt;4.3.9-<wbr>SNAPSHOT&lt;/model.version&gt; </i> in my Ovirt project.</div><div>3.create BackendVmMytestService implements VmMytestResource</div><div>4.override <i>get() and add() </i>methods.</div><div><br></div><div>After that, I use <i>curl</i>  tool to send GET and POST request. GET is working and return.</div><div>However, I get this return after POST request.</div><div><img src="cid:_Foxmail.1@b462724f-a213-bd0b-c34e-fd04bdd75893" border="0"></div><div><img src="cid:_Foxmail.1@a853e96a-ca52-0493-f43b-8453d53742de" style="font-size:10.5pt;line-height:1.5;background-color:transparent" border="0">   </div><div><br></div><div>Would you help me with that issue?</div><div><br></div><div>Thanks,</div><div>wenzt</div>
</div><br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>