Access form-data parameters from a ResourceController method |
Hi
I've the following route group configured Code: $routes->group('api/project', ['namespace' => 'App\Controllers\Api', 'filter' => 'apikey'], function ($routes) { However, the main route from the controller, the "/" (GET method) which calls Project::index can/must receive a parameter from body -> form-data Here's my index method from that controller, but cannot access any parameter from form-data using getPost, getGet, etc. Code: public function index() The only way to get the data is with getRawInput, but I get it in a very strange format Code: { Is there a clean way to get the parameters and values from body->form-data in a get method from a ResourceController ? Thanks
Enrique
https://beza.com.ar
The data is encoded with multipart/form-data. This data encoding is used for uploading files.
Don't use it for the GET method and you'll be fine. |
Welcome Guest, Not a member yet? Register Sign In |