Thanks, that sounds logical, and there seems to be progress, the error now
is different, I think there is something small that needs to be adjusted
"content": "<ns1:XMLFault
xmlns:ns1=\"http://cxf.apache.org/bindings/xformat\"><ns1:faultstring
xmlns:ns1=\"http://cxf.apache.org/bindings/xformat\">org.codehaus.jettison.json.JSONException:
A JSONObject text must begin with '{' at character 1 of
Username&param=MessageInfo&param=Password</ns1:faultstring></ns1:XMLFault>",
On Wednesday, January 2, 2019 at 7:20:57 PM UTC+2, Kai Stian Olstad wrote:
>
> On Wednesday, 2 January 2019 18:02:20 CET Hristo Georgiev wrote:
> > Hi, good point, I removed the "param=" part and the result is still the
> > same. I added the "param=" part because the WebService is using it. For
> > instance, when I use the same JSON file in the Postmane software, I do
> not
> > add "param=" to it, instead I specify it as a key. The software has the
> > fields "key" and "value", I put "param=" as a key and the JSON content
> as a
> > "value".
> > How can I do that in Ansible, how to specify the key?
>
> If you set
> body_format: form-urlencoded
>
> and then body to
>
> body:
> param: "{{ lookup('file','/tmp/outage.json') }}"
>
> and remove the headers: you will in the body get "parm={......" with
> proper urlencoding.
>
>
> --
> Kai Stian Olstad
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/463842fc-6410-433b-bd30-507213539b7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.