title: Lua body_data() returns nil although request body is not empty
body: <p>I am trying to get a payload from Github Webhook with lua code.</p>
  <p>I am able to get and see all the headers in the request but when I ask for body_data(), the content is empty, although it is not.</p>
  <p>Maybe I should call something else than body_data() to get the payload but I couldn't find anything else online.</p>
  <p>This is my Lua code:</p>
  <pre><code>local method = ngx.var.request_method
  local headers = ngx.req.get_headers()
  
  if method == &quot;POST&quot; then
     ngx.req.read_body()
     local body_data = ngx.req.get_body_data()
     ngx.print(body_data)
  
     local sha = headers['X-Hub-Signature-256']
  end
  </code></pre>
  <p>It prints out '<strong>nil</strong>'. The webhook payload is about 100 lines file. So why is it happening?</p>
  <p>If I print the 'sha' variable, I do see the result. I don't see any result only for the body..</p>
  <p>Please consult, thanks.</p>