title: curl: (6) Could not resolve host: POST; Unknown error
body: <p>I have shell script to run from Jenkins. First step generates token. But when executed from Jenkins, it gives connection error</p>
  <p>Jenkins here is Linux server</p>
  <p><strong>Command</strong>:</p>
  <pre><code>curl -w -X POST $URL -H Content-Type:application/x-www-form-urlencoded -H Content-Length:1045 -H Authorization:OAuth2 --data '{&quot;grant_type&quot;:&quot;password&quot;, &quot;username&quot;:&quot;User&quot;,&quot;password&quot;:&quot;pwd&quot;}' --write-out token
  </code></pre>
  <p><strong>Error</strong>:</p>
  <blockquote>
  <p>curl: (6) Could not resolve host: POST; Unknown error</p>
  <p>100    88    0     0    0    88      0      0 --:--:--  0:02:01 --:--:--     0</p>
  <p>100    88    0     0    0    88      0      0 --:--:--  0:02:02 --:--:--     0</p>
  <p>100    88    0     0    0    88      0      0 --:--:--  0:02:02 --:--:--     0</p>
  <p>curl: (56) Recv failure: Connection reset by peer</p>
  <p>Build step 'Execute shell' marked build as failure</p>
  </blockquote>