# Modify Request Content from Kibana

**URL:** <https://discuss.elastic.co/t/modify-request-content-from-kibana/60108>\
**Category:** Elasticsearch\
**Created:** [September 8, 2016, 6:56pm UTC](https://discuss.elastic.co/t/modify-request-content-from-kibana/60108 "2016-09-08T18:56:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joffett](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@joffett](https://discuss.elastic.co/u/joffett)\
**Post date:** [September 8, 2016, 6:56pm UTC](https://discuss.elastic.co/t/modify-request-content-from-kibana/60108/1 "2016-09-08T18:56:44Z")

</div>

Hi all,

I am currently trying to modify the content of a RestRequest in a custom plugin. I'm able to print the contents to the debugger, but I'm not sure of the best practice to modify it.

I've written a small extension around the RestRequest to set the content to a given BytesReference, but I'm not sure how to manipulate that.

Do you know of a way to either modify the BytesReference stored in RestRequest.content or convert a String back into a BytesReference?

Ideally this would be used to add a forced variable filter to every \_msearch from kibana. Is there a better way to implement this?

Thanks for your help!

Justin

---

<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:** [July 5, 2017, 10:21pm UTC](https://discuss.elastic.co/t/modify-request-content-from-kibana/60108/2 "2017-07-05T22:21:45Z")

</div>


