# In memory HTTP Request parsing

**URL:** <https://discuss.elastic.co/t/in-memory-http-request-parsing/182812>\
**Category:** Elasticsearch\
**Created:** [May 26, 2019, 9:24pm UTC](https://discuss.elastic.co/t/in-memory-http-request-parsing/182812 "2019-05-26T21:24:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simone\_Scarduzio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simone_scarduzio/32/17128_2.png) [@Simone\_Scarduzio](https://discuss.elastic.co/u/Simone_Scarduzio)\
**Post date:** [May 26, 2019, 9:24pm UTC](https://discuss.elastic.co/t/in-memory-http-request-parsing/182812/1 "2019-05-26T21:24:08Z")

</div>

I want to write an offline raw HTTP log enricher tool such that:

# input

series of HTTP request objects like:

```json
{
"id": "<uniqueID>",
"timestamp": "<someTimestmp>",
"method": "GET",
"uri": "/_cat/indices?pretty"
"headers": [{"header1name": ["header1value1"]}],
"body": "....."
}

```

# output

```auto
{
"id": "<uniqueID>",
"timestamp": "<someTimestmp>",
"type": "ClusterStateRequest",
"action": "cluster:monitor/state"
}

```

In order to do so, I really would not like to instantiate the whole Elasticsearch + write a plugin that echoes this info from inside.

Ideally I'd like to instantiate some class in Elasticsearch core that takes care of parsing HTTP requests into the internal format.

Any pointers on what is the best, least complicated way to do so?

---

<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, 2019, 9:24pm UTC](https://discuss.elastic.co/t/in-memory-http-request-parsing/182812/2 "2019-06-23T21:24:17Z")

</div>

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