Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Mason我需要使用基于 - 的 Perl 脚本接收来自“请求有效负载”标头的数据。
Mason
我试过$r->body(), $r->upload(),$m->content()方法,但它们返回空字符串。
$r->body()
$r->upload()
$m->content()
请求中的数据存在,我已经用 Chrome 开发工具检查了它。
解决方案:
my $raw_body; $r->read($raw_body, $r->headers_in->{'Content-length'});