title: How to better convert a curl to ansible uri
body: <p>Convert a curl command to uri</p>
  
  <pre><code>curl -kG "https://{{inventory_hostname}}/api/?type=export&amp;category=configuration&amp;key=&lt;key&gt;"
  </code></pre>
  
  <p>I am using this playbook:</p>
  
  <pre><code>tasks:
      - name: Backup Palo
        uri:
           validate_certs: no
           url: https://{{inventory_hostname}}/api/?type=config&amp;action=show&amp;key={{LUFRPT1YOXlKeWZ1SWc4TFliTGpldEJQVVRYSEpZak09eitKQUlDeGtaTjZ5d09Yb2EvVml0ZmFEbENZUm9qcUJCbWttSFJQS3BMYz0= }}
           return_content: yes
           method: PUT
        register: result
  
      - copy:
          content: "{{ result['content'] }}"
          dest: backup/{{ansible_network_os}}/{{inventory_hostname}}-{{date}}.cfg
  </code></pre>
  
  <p>However, I always get the following error:</p>
  
  <pre><code>FAILED! =&gt; {"changed": false, "connection": "close", "content": "&lt;html&gt;\r\n&lt;head&gt;&lt;title&gt;411 Length Required&lt;/title&gt;&lt;/head&gt;\r\n&lt;body bgcolor=\"white\"&gt;\r\n&lt;center&gt;&lt;h1&gt;411 Length Required&lt;/h1&gt;&lt;/center&gt;\r\n&lt;hr&gt;&lt;center&gt;&lt;/center&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;\r\n", "content_length": "169", "content_type": "text/html", "date": "Tue, 06 Aug 2019 20:46:15 GMT", "elapsed": 0, "msg": "Status code was 411 and not [200]: HTTP Error 411: Length Required", "redirected": false, "status": 411,
  </code></pre>