# How to parse all post params

**URL:** <https://discuss.elastic.co/t/how-to-parse-all-post-params/64335>\
**Category:** Beats\
**Tags:** packetbeat\
**Created:** [October 29, 2016, 10:01am UTC](https://discuss.elastic.co/t/how-to-parse-all-post-params/64335 "2016-10-29T10:01:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shell.b2t](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@shell.b2t](https://discuss.elastic.co/u/shell.b2t)\
**Post date:** [October 29, 2016, 10:01am UTC](https://discuss.elastic.co/t/how-to-parse-all-post-params/64335/1 "2016-10-29T10:01:20Z")

</div>

I use packetbeat to capure http packet, but found some POST parameters can not be captured

packetbeat info :

```
**[root@localhost packetbeat]# /usr/share/packetbeat/bin/packetbeat --version**
**packetbeat version 5.0.0 (amd64), libbeat 5.0.0**

```

**packetbeat.yml conent as following:**

```
packetbeat.protocols.http:
  # Configure the ports where to listen for HTTP traffic. You can disable
  # the HTTP protocol by commenting out the list of ports.
  ports: [80,8080,7001]

  send_all_headers: true
  #send_request: true
  send_response: true
  max_message_size: 10485760

```

**raw request 1 as following:**

```
POST / ****** /servlet/dispatcherServlet HTTP/1.1
Connection: close
User-Agent: Jakarta Commons-HttpClient/3.1
Host: 10.10.56.29:7001
Content-Length: 141

```

_There is no content-type_

raw request 2 as following:

```
POST /servicebus/services/ForwardService HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:anonOutInOp"
User-Agent: Axis2
Host: 10.10.0.60
Transfer-Encoding: chunked

```

request 1 and 2 are not parse the post params

Thanks!

---

<div class="post-metadata">

**Author:** ![shell.b2t](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@shell.b2t](https://discuss.elastic.co/u/shell.b2t)\
**Post date:** [October 31, 2016, 3:39pm UTC](https://discuss.elastic.co/t/how-to-parse-all-post-params/64335/2 "2016-10-31T15:39:32Z")

</div>

nobody help me?

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [October 31, 2016, 4:13pm UTC](https://discuss.elastic.co/t/how-to-parse-all-post-params/64335/3 "2016-10-31T16:13:07Z")

</div>

You should be able to capture request 2 if you set [`include_body_for`](https://www.elastic.co/guide/en/beats/packetbeat/1.2/configuration-protocols.html#_include_body_for) in your configuration file.

```auto
protocols:
  http:
    ports: [80, 8080, 7001]
    send_request: true
    send_response: true # If you also want text/xml responses.
    include_body_for: ['text/xml']

```

Without a `Content-Type`, AFAICT it is not currently possible to capture the body.

---

<div class="post-metadata">

**Author:** ![shell.b2t](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@shell.b2t](https://discuss.elastic.co/u/shell.b2t)\
**Post date:** [November 6, 2016, 1:38am UTC](https://discuss.elastic.co/t/how-to-parse-all-post-params/64335/4 "2016-11-06T01:38:49Z")

</div>

if there is no content-type,that how to capture the request,just like request1

---

<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, 9:50pm UTC](https://discuss.elastic.co/t/how-to-parse-all-post-params/64335/7 "2017-07-05T21:50:08Z")

</div>


