Andre F.
Andre F.

Reputation: 1163

Laravel 5.2 & Postman GET Requests are not passing $request->send()

I'm having some difficulty with sending a simple GET request via Postman (An application extension in google chrome) to my Laravel 5.2 server. Here are some details to what I'm doing:

Route here: Image shows GET Request and the route being used in the address bar

Next is the code containing the route Code here (within the laravel routes.php file): enter image description here

Finally the error that gets thrown Error Here enter image description here

I've gone through multiple tutorials (if resources are needed I will post them on request) and videos and yet I think I may have overlooked something. I've even dived into the source code of Laravel's Route handler but it doesn't even get to the method:

     $request->send();

located within the public\index.php file on line 56.

When I perform the:

 php artisan route:list

I get the following response:

+--------+----------+-----------------------+------+--------------------------------------------------------+-----------------------------------+
| Domain | Method   | URI                   | Name | Action                                         | Middleware  |
+--------+----------+-----------------------+------+------------------------------------------------------------------------------+-------------+
|        | POST     | here                  |      | Closure                                        | web         |
|        | GET|HEAD | user/:id/validate|    | \Controllers\UserController@getOAuthValidation | web,api  |
+--------+----------+-----------------------+------+--------------------------------------------------------+-----------------------------------+

If ANYONE can shed some light on this I would greatly appreciate it.

Upvotes: 0

Views: 1183

Answers (1)

Snapey
Snapey

Reputation: 4110

strange. Your routes file is /user/validate but your route is expecting an id.

I'm assuming that the validate method requires an id field in its signature?

Remove that, or change your postman get to /user/1/validate

Upvotes: 1

Related Questions