2021年1月21日星期四

Laravel API Request - Not able to display Posted Data/Passed Parameters

I need help on my Laravel API,

I have an external API Request written in C#

Method: Post Data is JSON which is being posted to my Laravel API URL: http://localhost/project/api/company-data

API route:

Route::post('company-data', 'API\APIController@index');  

Here is my API Controllers index() function

 public function index(Request $request)      {                   return var_dump($request->all());      }  

My API Call is hitting the function since I was able to capture it on logs, However it is returning me an empty array? How do I catch the json data that was posted to my API?

Thank You for your help, my apologies if I cannot explain my concern clearly,

https://stackoverflow.com/questions/65827576/laravel-api-request-not-able-to-display-posted-data-passed-parameters January 21, 2021 at 08:35PM

没有评论:

发表评论