http icon indicating copy to clipboard operation
http copied to clipboard

Request data can be read only once

Open knazarov opened this issue 8 years ago • 2 comments

If I call req:param() then req:json() will fail subsequently, because it won't be able to read the request body using req:read(), because req:read() is not reentrant.

Request body should be cached somewhere. At least if content-type is application/json

knazarov avatar Feb 28 '17 09:02 knazarov

:read_cached() is already implemented

bigbes avatar Jun 18 '18 13:06 bigbes

:read_cached() is already implemented

Please add :read_cached() to readme.

iDneprov avatar Nov 09 '22 12:11 iDneprov