title: send multiline form with ansible uri module
body: <p>I'm trying to upload a multi-line file to a appdynamics controller, using the ansible uri module.  Any advice?</p>
  
  <p>As you'll notice in the snippets, I'm brand new to Ansible...</p>
  
  <p>It works fine with shell: curl, but I can't seem to get the output correct for a more structured play.</p>
  
  Works
  
  <pre><code>- name: import health rule xml via curl
       shell: "curl -i -X POST {{ APPD_HEALTH_RULE_URL }}/{{ APPD_APPLICATIAON_ID }}?overwrite={{ OVERWRITE_EXISTING_RULE }} -H {{ APPD_AUTH_TOKEN }} -F file=@{{ WORKSPACE }}/infrastructure_health_rule_template.xml"
       register: health_rule
  </code></pre>
  
  Doesn't work
  
  <pre><code>  - name: import health rule to application
      uri:
        url: "{{ APPD_HEALTH_RULE_URL }}/{{ APPD_APPLICATIAON_ID }}?overwrite={{ OVERWRITE_EXISTING_RULE }}"
        method: POST
        headers: 
          Authorization       : "{{ APPD_TOKEN }}"
          Content-Type        : "multipart/form-data"
        return_content        : yes
        follow_redirects      : all
        body_format           : raw
        body                  : msg="{{lookup('file', '{{ WORKSPACE }}/infrastructure_health_rule_template.xml') }}"
        status_code: 
         - 100
         - 200
         - 201
         - 202
         - 300
         - 301
         - 302
         - 307
      register: health_rule
  </code></pre>
  
  <p>Expected outcome - I'm able to successfully import the health rule to AppD</p>
  
  <p>Actual - I get a 200 response, and nothing happens.</p>
  
  <p>Response:</p>
  
  <pre><code>ok: [localhost] =&gt; {
      "age": "0",
      "changed": false,
      "connection": "close",
      "content": "the request was rejected because no multipart boundary was found \n",
      "cookies": {
          "JSESSIONID": "NUMBERS &amp; STUFF"
      },
      "cookies_string": "JSESSIONID=NUMBERS &amp; STUFF",
      "date": "Wed, 25 Sep 2019 20:25:07 GMT",
      "elapsed": 0,
      "invocation": {
          "module_args": {
              "attributes": null,
              "backup": null,
              "body": "&lt;health-rules controller-version=\"VERSION HERE\"&gt;\n  &lt;health-rule&gt;\n    &lt;name&gt;Disk_Space_too_low&lt;/name&gt;\n    &lt;type&gt;INFRASTRUCTURE&lt;/type&gt;\n    &lt;description/&gt;\n    &lt;enabled&gt;True&lt;/enabled&gt;\n    &lt;is-default&gt;false&lt;/is-default&gt;\n    &lt;always-enabled&gt;true&lt;/always-enabled&gt;\n    &lt;duration-min&gt;35&lt;/duration-min&gt;\n    &lt;wait-time-min&gt;35&lt;/wait-time-min&gt;\n    &lt;affected-entities-match-criteria&gt;\n        &lt;affected-infra-match-criteria&gt;\n            &lt;type&gt;NODES&lt;/type&gt;\n            &lt;node-match-criteria&gt;\n                &lt;type&gt;CUSTOM&lt;/type&gt;\n                &lt;match-type&gt;STARTSWITH&lt;/match-type&gt;\n                &lt;match-pattern&gt;i-&lt;/match-pattern&gt;\n                &lt;inverse&gt;True&lt;/inverse&gt;\n                &lt;node-meta-info-match-criteria/&gt;\n                &lt;vm-sys-properties/&gt;\n                &lt;env-properties/&gt;\n            &lt;/node-match-criteria&gt;\n        &lt;/affected-infra-match-criteria&gt;\n    &lt;/affected-entities-match-criteria&gt;\n    &lt;critical-execution-criteria&gt;\n        &lt;entity-aggregation-scope&gt;\n            &lt;type&gt;ANY&lt;/type&gt;\n            &lt;value&gt;0&lt;/value&gt;\n        &lt;/entity-aggregation-scope&gt;\n        &lt;policy-condition&gt;\n            &lt;type&gt;leaf&lt;/type&gt;\n            &lt;display-name&gt;Hardware Resources|Volumes|Used %&lt;/display-name&gt;\n            &lt;condition-value-type&gt;ABSOLUTE&lt;/condition-value-type&gt;\n            &lt;condition-value&gt;90.0&lt;/condition-value&gt;\n            &lt;operator&gt;GREATER_THAN&lt;/operator&gt;\n            &lt;condition-expression/&gt;\n            &lt;use-active-baseline&gt;False&lt;/use-active-baseline&gt;\n            &lt;trigger-on-no-data&gt;False&lt;/trigger-on-no-data&gt;\n            &lt;metric-expression&gt;\n                &lt;type&gt;leaf&lt;/type&gt;\n                &lt;function-type&gt;VALUE&lt;/function-type&gt;\n                &lt;value&gt;0&lt;/value&gt;\n                &lt;is-literal-expression&gt;False&lt;/is-literal-expression&gt;\n                &lt;display-name&gt;&lt;/display-name&gt;\n                &lt;metric-definition&gt;\n                    &lt;type&gt;LOGICAL_METRIC&lt;/type&gt;\n                    &lt;logical-metric-name&gt;Hardware Resources|Volumes|Used (%)&lt;/logical-metric-name&gt;\n                &lt;/metric-definition&gt;\n            &lt;/metric-expression&gt;\n        &lt;/policy-condition&gt;\n    &lt;/critical-execution-criteria&gt;\n    &lt;warning-execution-criteria&gt;\n        &lt;entity-aggregation-scope&gt;\n            &lt;type&gt;ANY&lt;/type&gt;\n            &lt;value&gt;0&lt;/value&gt;\n        &lt;/entity-aggregation-scope&gt;\n        &lt;policy-condition&gt;\n            &lt;type&gt;leaf&lt;/type&gt;\n            &lt;display-name&gt;Hardware Resources|Volumes|Used %&lt;/display-name&gt;\n            &lt;condition-value-type&gt;ABSOLUTE&lt;/condition-value-type&gt;\n            &lt;condition-value&gt;80.0&lt;/condition-value&gt;\n            &lt;operator&gt;GREATER_THAN&lt;/operator&gt;\n            &lt;condition-expression/&gt;\n            &lt;use-active-baseline&gt;False&lt;/use-active-baseline&gt;\n            &lt;trigger-on-no-data&gt;False&lt;/trigger-on-no-data&gt;\n            &lt;metric-expression&gt;\n                &lt;type&gt;leaf&lt;/type&gt;\n                &lt;function-type&gt;VALUE&lt;/function-type&gt;\n                &lt;value&gt;0&lt;/value&gt;\n                &lt;is-literal-expression&gt;False&lt;/is-literal-expression&gt;\n                &lt;display-name&gt;&lt;/display-name&gt;\n                &lt;metric-definition&gt;\n                    &lt;type&gt;LOGICAL_METRIC&lt;/type&gt;\n                    &lt;logical-metric-name&gt;Hardware Resources|Volumes|Used (%)&lt;/logical-metric-name&gt;\n                &lt;/metric-definition&gt;\n            &lt;/metric-expression&gt;\n        &lt;/policy-condition&gt;\n    &lt;/warning-execution-criteria&gt;\n&lt;/health-rule&gt;\n&lt;/health-rules&gt;",
              "body_format": "raw",
              "client_cert": null,
              "client_key": null,
              "content": null,
              "creates": null,
              "delimiter": null,
              "dest": null,
              "directory_mode": null,
              "follow": false,
              "follow_redirects": "all",
              "force": false,
              "force_basic_auth": false,
              "group": null,
              "headers": {
                  "Authorization": "Bearer REALLY LONG STRING OF CHARACTERS",
                  "Content-Type": "multipart/form-data"
              },
              "http_agent": "ansible-httpget",
              "method": "POST",
              "mode": null,
              "owner": null,
              "regexp": null,
              "remote_src": null,
              "removes": null,
              "return_content": true,
              "selevel": null,
              "serole": null,
              "setype": null,
              "seuser": null,
              "src": null,
              "status_code": [
                  100,
                  200,
                  201,
                  202,
                  300,
                  301,
                  302,
                  307
              ],
              "timeout": 30,
              "unix_socket": null,
              "unsafe_writes": null,
              "url": "####### URL #######",
              "url_password": null,
              "url_username": null,
              "use_proxy": true,
              "validate_certs": true
          }
      },
      "msg": "OK (unknown bytes)",
      "redirected": false,
      "server": "AppDynamics",
      "set_cookie": "JSESSIONID=NUMBERS &amp; STUFF; Path=/controller; HttpOnly;Secure",
      "status": 200,
      "transfer_encoding": "chunked",
      "url": "####### URL #######,
      "via": "1.1 varnish",
      "x_content_type_options": "Nosniff",
      "x_frame_options": "SAMEORIGIN",
      "x_varnish": "1299636501",
      "x_xss_protection": "1; mode=block"
  }
  META: ran handlers
  META: ran handlers
  
  PLAY RECAP ***************************************************************************************************************
  localhost                  : ok=5    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0  
  </code></pre>