<div dir="ltr">I&#39;ve been using headers in the api curl command for over a year. My lua code looks like this:<div>-- url is in the form https://user:password@host/path</div><div>-- data is a JSON string in the form { &quot;name&quot;:&quot;value&quot;, &quot;name2&quot;:&quot;value2&quot; }<br><div><div>api:execute(&quot;curl&quot;, url .. &quot; content-type application/json post &#39;&quot; .. data .. &quot;&#39;&quot;)</div></div><div><br></div></div><div>Which brings up a problem I&#39;m having. Some time ago when I upgraded FreeSWITCH, the user:password fields either started getting corrupted or ignored, because I&#39;m now getting a 401 error. I&#39;m going to look through the curl code to see if I can find where this is happening.</div><div><br></div><div>-- </div><div>Steve</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 28, 2017 at 8:29 AM, Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">in master it just got added to the api command, i don’t think its in the js object.<span class=""><div><br><div><blockquote type="cite"><div>On Mar 28, 2017, at 6:43 AM, Matt Broad &lt;<a href="mailto:matt@supportedbusiness.com" target="_blank">matt@supportedbusiness.com</a>&gt; wrote:</div><br class="m_4826083116000553530Apple-interchange-newline"><div><div dir="ltr">Hi,<div><br></div><div>is it possible to add a header when using  the javascript function curl.run?</div><div>I need to add a custom header.</div><div><br></div><div>Below is an example of the script I currently use</div><div><br></div><div><div>var curl = new CURL();</div><div>curl.run(&quot;GET&quot;, &quot;<a href="http://www.url.com/" target="_blank">http://www.url.com</a>&quot;, &quot;details=value&quot;, curl_callback, &quot;myarg&quot;);<br></div></div><div><br></div></div></div></blockquote></div><br></div></span></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" 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.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>