# Logstash-filter-rest POST Request Issue

**URL:** <https://discuss.elastic.co/t/logstash-filter-rest-post-request-issue/131449>\
**Category:** Logstash\
**Created:** [May 11, 2018, 9:42am UTC](https://discuss.elastic.co/t/logstash-filter-rest-post-request-issue/131449 "2018-05-11T09:42:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MariumHassan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mariumhassan/32/30321_2.png) [@MariumHassan](https://discuss.elastic.co/u/MariumHassan)\
**Post date:** [May 11, 2018, 9:42am UTC](https://discuss.elastic.co/t/logstash-filter-rest-post-request-issue/131449/1 "2018-05-11T09:42:42Z")

</div>

This issue has been resolved.

* * *

Hi,

I have recently installed [logstash-filter-rest](https://github.com/lucashenning/logstash-filter-rest#usage). 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:

```auto
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:

```auto
<?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

---

<div class="post-metadata">

**Author:** ![saramali](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@saramali](https://discuss.elastic.co/u/saramali)\
**Post date:** [May 11, 2018, 10:36am UTC](https://discuss.elastic.co/t/logstash-filter-rest-post-request-issue/131449/2 "2018-05-11T10:36:17Z")

</div>

This seems important.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 8, 2018, 10:36am UTC](https://discuss.elastic.co/t/logstash-filter-rest-post-request-issue/131449/3 "2018-06-08T10:36:24Z")

</div>

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