# How to set HTTP filter body to whole event

**URL:** https://discuss.elastic.co/t/how-to-set-http-filter-body-to-whole-event/243041
**Category:** Logstash
**Created:** [July 29, 2020, 11:29am UTC](https://discuss.elastic.co/t/how-to-set-http-filter-body-to-whole-event/243041 "2020-07-29T11:29:00Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [July 29, 2020, 5:18pm UTC](https://discuss.elastic.co/t/how-to-set-http-filter-body-to-whole-event/243041/2 "2020-07-29T17:18:50Z")

</div>

I have not tested it, but you could try something like

```
ruby { code => 'event.set("[@metadata][body]", event.to_hash)' }

```

then use

```
body => "%{[@metadata][body]}"

```

You might also want to set the body\_format option.

---

_[View the full topic](https://discuss.elastic.co/t/how-to-set-http-filter-body-to-whole-event/243041)._
