# Help writing a custom plugin to allow only GET requests

**URL:** <https://discuss.elastic.co/t/help-writing-a-custom-plugin-to-allow-only-get-requests/234266>\
**Category:** Elasticsearch\
**Created:** [May 26, 2020, 8:03am UTC](https://discuss.elastic.co/t/help-writing-a-custom-plugin-to-allow-only-get-requests/234266 "2020-05-26T08:03:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahulkarajgikar](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@rahulkarajgikar](https://discuss.elastic.co/u/rahulkarajgikar)\
**Post date:** [May 26, 2020, 8:03am UTC](https://discuss.elastic.co/t/help-writing-a-custom-plugin-to-allow-only-get-requests/234266/1 "2020-05-26T08:03:15Z")

</div>

Hi, I'm trying to write an action plugin that will intercept REST requests using the `getRestHandlerWrapper()`method in the ActionPlugin class. However, it says that only one plugin can implement this method. How do I remove the existing plugin that implements this from elasticsearch locally? Also, is there any other way I could make a plugin to intercept requests? I tried looking at the ActionFilter class, but I had no idea how to begin. Basically the plugin should allow only GET requests, and disallow POST requests.

---

<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 23, 2020, 8:03am UTC](https://discuss.elastic.co/t/help-writing-a-custom-plugin-to-allow-only-get-requests/234266/2 "2020-06-23T08:03:36Z")

</div>

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