Logstash-filter-rest POST Request Issue

This issue has been resolved.


Hi,

I have recently installed logstash-filter-rest. Now, I want to send a POST request to my webservice which takes xml body, parses it using JAXB and returns xml but I am having an issue with the usage of this plugin. Problem is that I am unable to send xml in request body using this plugin.

Following is a sample code:

filter 
{ 
  rest 
  { 
    request => 
    {
      url => "https://jsonplaceholder.typicode.com/posts" 
      method => "post" 
      body => { "userId" => "%{message}" } 
      headers => { "Content-Type" => "application/json" } 
    }    
    target => 'rest' 
  } 
}

Here I want to send my xml in the body. Below is a sample xml to be sent:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Header>
        <:MessageID>messageID</:MessageID>
        <Requestor>clientID</Requestor>
    </Header>
    <store>2571</store>

Any help will be appreciated.

Thanks in anticipation

1 Like

This seems important.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.