# Request body in a module

**URL:** <https://www.ruby-forum.com/t/request-body-in-a-module/238374>\
**Category:** NGINX\
**Created:** [January 7, 2014, 4:07pm UTC](https://www.ruby-forum.com/t/request-body-in-a-module/238374 "2014-01-07T16:07:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [January 7, 2014, 4:07pm UTC](https://www.ruby-forum.com/t/request-body-in-a-module/238374/1 "2014-01-07T16:07:17Z")

</div>

Hi, have been trying to read the request body in my module, using the  
information I have gotten from this forum and some blogs and basically  
came  
up with the following functions  
as can be seen in this post [Reading request body in a module](http://forum.nginx.org/read.php?11,245953).  
The  
problem is that the request\_body.bufs seem to contain no data.

If I check the request body with the following conf:

```
log_format my_tracking $request_body;

   location /dd {
      access_log logs/postdata.log my_tracking;
      proxy_pass http://127.0.0.1:8081/temp_service;
    }

    location /demo {
      access_log logs/postdata.log my_tracking;
      demo;
    }

```

I get the request\_boody logged in the first /dd post request but in the  
second /demo I do not get anything logged if I post data  
Use the following command the trying it out: curl -v --request POST -d  
“a=b” [http://localhost:8080/dd](http://localhost:8080/dd)  
Anyone that have an idea what can be wrong?

Best Regards  
Christer

Posted at Nginx Forum:

> **[Request body in a module](https://forum.nginx.org/read.php?2,246098,246098#msg-246098)**
>
> Hi, have been trying to read the request body in my module, using the information I have gotten from this forum and some blogs and basically came up with the following functions as can be seen in this post http://forum.nginx.org/read.php?11,245953....
