<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Curl on Bits Thoughts &amp; More, hugo based</title><link>https://997f8fd8.myblog-1k6.pages.dev/tags/curl/</link><description>Recent content in Curl on Bits Thoughts &amp; More, hugo based</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Wed, 18 Apr 2018 00:00:00 +0000</lastBuildDate><atom:link href="https://997f8fd8.myblog-1k6.pages.dev/tags/curl/index.xml" rel="self" type="application/rss+xml"/><item><title>curl auth with cookie</title><link>https://997f8fd8.myblog-1k6.pages.dev/posts/curl-auth-with-cookie/</link><pubDate>Wed, 18 Apr 2018 00:00:00 +0000</pubDate><guid>https://997f8fd8.myblog-1k6.pages.dev/posts/curl-auth-with-cookie/</guid><description>
&lt;p&gt;use curl to simulate authentication in apis that provide a cookie via auth endpoint
(nimbula was using this)&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;curl -kc ./authtokens -X POST -H &amp;#34;Content-Type: text/plain&amp;#34; -d &amp;#39;{&amp;#34;result&amp;#34;: null, &amp;#34;password&amp;#34;: &amp;#34;testpassword&amp;#34;, &amp;#34;uri&amp;#34;: null, &amp;#34;user&amp;#34;: &amp;#34;/test/user&amp;#34;}&amp;#39; https://&amp;lt;server&amp;gt;:445/authenticate/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;then you can use the cookie from the file to get something:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;curl -k -b ./authtokens -X GET &amp;#34;https://&amp;lt;server&amp;gt;:445/node/&amp;#34;
&lt;/code&gt;&lt;/pre&gt;</description></item></channel></rss>