I'm developing a RESTful API with Laravel 5.3, so I'm testing some functions and request with my controllers. One thing I need to do is validate the request that my user sends before add a field in my database, so, I use a custom FormRequest to validate it.
当我在Postman中测试API并发送无效请求时,响应将我重定向到主页.在阅读文档之后,我发现了以下语句
如果验证失败,将生成重定向响应以发送
How can I prevent this? Or there is a AJAX mode in Postman? Any suggestion?