fail to use uri to POST file to a service

Hello
The following curl from the host to the provision servers works fine:

`
curl -X POST --header “Content-Type: application/json” -d @file.json http://public-ip/api

`

Trying to use uri module for the same, I used:

`

  • local_action: uri url=http://public-ip/api method=POST body=“{{ lookup(‘file’,‘file.json’) }}” HEADER_Content-Type=“application/json”
    sudo: false

`

Only to get

`
msg: this module requires key=value arguments

`

Any idea whats going on here?
Thanks

Try changing the body to something simple and seeing if it works. I’m guessing that something inside of the file.json that is causing a parse error. One option is to put the contents of the file.json directly into the body=“{ jsonk: ‘jsonv’, }”

Hope that helps.