title: Special characters in curl post
body: <p>I am trying to use the following curl</p>
  
  <pre><code>curl -k 'https://myhost.com:9091/nifi-api/access/token' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' --data "username=$USERNAME&amp;password=$PASSWORD" --compressed —insecure
  </code></pre>
  
  <p>But get an error with a <code>%</code> in the password saying</p>
  
  <pre><code>URLDecoder: Incomplete trailing escape (%) pattern
  </code></pre>
  
  <p>I have seen suggestions online to use <code>--data-urlencode</code> but then I get the following error.</p>
  
  <pre><code>The username and password must be specified.
  </code></pre>
  
  <p>How can I resolve this issue?</p>