Toml parse soap request as string


Hi ,

Im trying to send soap request by using the [[inputs.http_response]] plugin .
Im having an issue with parsing the body correctly.
how can i parse this body with the quotes and without new line

<soapenv:Envelope xmlns:soapenv="" xmlns:s="http://XXXX/">

Can you add your configuration for the http_response plugin?


this config will generate error

2017-08-15T06:19:20Z E! Error in plugin [inputs.http_response]: Post http://iisnlb/TlvBusinessLogic/Applications/Integration/ActiveDirectory/InterfaceToADService.asmx: net/http: invalid header field value "\\\n <soapenv:Envelope xmlns:soapenv=\"\" xmlns:tlv=\"http://Tlv.Integration.Servies.ActiveDirectory/\">\\\n <soapenv:Header/>\\\n <soapenv:Body>\\\n <tlv:IsUserExist>\\\n <tlv:user>\\\n <tlv:UserName>XXXX</tlv:UserName>\\ \n </tlv:user>\\\n </tlv:IsUserExist>\\\n </soapenv:Body>\\\n</soapenv:Envelope>\\\n" for key Body


#HTTP/HTTPS request given an address a method and a timeout

   address = "XXXXX"

   response_timeout = "10s"

   method = "POST"
     "SOAPAction" = "XXXX"
     "Content-type" = "text/xml; charset=utf-8"
### Optional HTTP Request Body
        body = '''\
         <soapenv:Envelope xmlns:soapenv="" xmlns:tlv="http://Tlv.Integration.Servies.ActiveDirectory/">\

Try moving the body above the [inputs.http_response.headers] section, otherwise it becomes part of the headers section. I’ll update the sample configuration file since it recommends this incorrect ordering.

1 Like