laravel 为什么来自 POSTMAN 的 POST 请求返回空?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/52249289/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why POST Request from POSTMAN returns empty?
提问by Success Man
My header in the postman like this :
我在邮递员中的标题是这样的:
My body like this :
我的身体是这样的:
In the routes laravel lumen, I check like this :
在 Laravel 流明路线中,我检查如下:
$router->group(['middleware' => 'auth'], function ($router) {
...
$router->post('/sales-order', function (\Illuminate\Http\Request $request)
{
echo '<pre>';print_r($request->all());echo '</pre>';die();
});
});
The result in the postman return empty array like this :
邮递员返回空数组的结果如下:
How can I solve the error?
我该如何解决错误?
采纳答案by Beginner
DUDE! I finally realize your parameters is wrong
伙计!我终于意识到你的参数是错误的
"number": ""123""
you put 2 double quote it should "number": "123"
"number": ""123""
你把 2 双引号它应该 "number": "123"