<div dir="ltr">mod_curl will send a POST if you ask for it to (use post, not get in the call). You have to be precise when describing the issue. You don't want it to send as a form post, but rather just to post the 'raw' data. <div>
<br></div><div>you can do this today.</div><div><br></div><div style>The ticket just gives you control of the header that sets the content-type. The receiver on the other end can choose to ignore the content type if it knows it should always just get raw XML.</div>
<div style><br></div><div style>Use wireshark (or equiv) to verify what is being sent...</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 8, 2013 at 2:07 PM, JP <span dir="ltr"><<a href="mailto:jaykris@gmail.com" target="_blank">jaykris@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Rupa. I guess I need to re-read your email to understand better. For now I have asked the vendor controlling the end point to switch to GET. I will try out what you suggested when I get some free cycles and update this thread.<div>
<br></div><div>Regards,</div><div>JP<div><div class="h5"><br><br><div class="gmail_quote">On Thu, Feb 7, 2013 at 5:49 PM, Rupa Schomaker <span dir="ltr"><<a href="mailto:rupa@rupa.com" target="_blank">rupa@rupa.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">Umm.. I just explained how to do it. The only piece missing is the setting of the content-type header, but if that isn't going to be a problem you odn't have to do anything special.<div>
<br></div><div>
Just remember to urlencode the (full) contents of the XML.</div><div><br></div><div>And try it out. Use wireshark to see what is sent over the wire to the server. </div></div><div class="gmail_extra"><div><div>
<br><br><div class="gmail_quote">
On Thu, Feb 7, 2013 at 11:26 AM, JP <span dir="ltr"><<a href="mailto:jaykris@gmail.com" target="_blank">jaykris@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes what I am looking for is to POST xml data in the body and not as name/value pairs. Is this possible?<div><br></div><div>Thanks,</div><div>-JP<br><br><div class="gmail_quote"><div><div>On Wed, Feb 6, 2013 at 7:21 PM, Rupa Schomaker <span dir="ltr"><<a href="mailto:rupa@rupa.com" target="_blank">rupa@rupa.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div>On Wed, Feb 6, 2013 at 6:56 PM, Cal Leeming [Simplicity Media Ltd] <span dir="ltr"><<a href="mailto:cal.leeming@simplicitymedialtd.co.uk" target="_blank">cal.leeming@simplicitymedialtd.co.uk</a>></span> wrote:<br>
</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The docs says this;<div><br>curl url [headers|json] [get|head|post [url_encode_data]]</div>
</blockquote><div><br></div></div><div>The [headers|json] is all about the response format. Just to make sure that is clear.</div><div><br></div><div>get/head/post should be self-evident</div><div><br></div>
<div>url_encode_data is supposed to be the url encoded version of what you want to send to the server. It is encoded on purpose (so that we don't have to worry about embedded spaces or other special chars).</div>
<div><br></div><div>So, you really just need to do:</div><div><br></div><div>curl <a href="http://example.com/" target="_blank">http://example.com/</a> post encodedxmlhere</div><div><div><br></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><br></div><div>So, I assume you'd just do.</div>
<div>
<br></div><div>curl <a href="http://example.com/" target="_blank">http://example.com/</a> post xml=encodedxmlhere</div>
<div><br></div></blockquote><div><br></div></div><div>This will result in www-url-encoded with key/value pair with xml as key and the encoded xml as the value. This may be what the OP wants, but I think what he wants is just XML.</div>
<div><br></div><div><br></div><div>Note that the content-type will still be <span style="line-height:17px;font-size:13px;font-family:Arial,FreeSans,Helvetica,sans-serif">application/x-www-form-urlencoded which is "wrong". I've written xml service endpoints that behave differently based on the content-type. Depending on how your service is written this may be ok or not. There is an open ticket to address the content-type issue.</span></div>
<div><br></div><div><a href="http://jira.freeswitch.org/browse/FS-4714" target="_blank">http://jira.freeswitch.org/browse/FS-4714</a><br></div><div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div></div><div>Taken from here;</div><div><a href="http://wiki.freeswitch.org/wiki/Mod_curl" target="_blank">http://wiki.freeswitch.org/wiki/Mod_curl</a></div><div><br></div><div>Hope this helps, apologies if I misunderstood the question</div>
<div><br></div><div>Cal</div><div><br></div></blockquote></div></div><span><font color="#888888"><div><br></div>-- <br>-Rupa
</font></span></div></div>
<br></div></div><div>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></div></blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br>-Rupa
</font></span></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>-Rupa
</div>