Jenkins input pipeline step filled via POST with CSRF - howto?
<p>I have Jenkins pipeline with an Input step, and I would like to submit this input(single string argument) via a script. 
So far I am trying with curl, ideally I'll be sending it via Python requests library. This should be an easy POST request, however with CSRF it becomes tricky. I've obtained Jenkins-Crumb (using curl in this case, from the same machine and same bash session), but still can't send the content...</p>

<p>I'm sending <code>Jenkins-Crumb:XXX</code> header, just like it is explained at <a href="https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API" rel="noreferrer">https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API</a></p>

<p>my request looks like this:</p>

<pre><code>curl -vvv -X POST --user '${USER}:${API_KEY}' -H "Jenkins-Crumb:${JENKINS_CRUMB}" -d 'json="{"parameter":{"name":"${PARAM_NAME}","value":"asd"},"Jenkins-Crumb":"${JENKINS_CRUMB}"}"' 'http://${JENKINS_URL}/job/${JOB_NAME}/${BUILD_NR}/input/'
</code></pre>

<p>The URL I'm POSTing at is the same, as the one linked in build log (Console output).</p>