'I am looking for a way to test APIs on Laravel project with an API testing tool
I made an API with Laravel. it needs to Auth.method is PUT. How can I test it?
The respoce of API is 302
BODY pretty Sorry, the Chrome API does not allow to get a response body for redirect.
I reckon that my API test tool is not logged-in my laravel app so redirect happened.
P.S
Even after I commented out the Auth::user() this error still happens.
Solution 1:[1]
The hack is you can comment out the middleware in api.php
Note: removing/commenting the middleware is definitely not a good solution but like you said you have commented out the Auth:user() so sharing the hack.
Correct way is shared by @Ramanath, Where you can login using login API(you can use the UI also and get the auth token from network too). and put the token in the Authorization/header section like the screenshot below
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Navneeta |

