Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

213
Views
POST request is always empty - Laravel 8

I am using PHP 8.0.7, Laravel 8.41.0 and new to Laravel. Building some simple APIs. No issues with GET APIs but having trouble with POST.

The $request object is always empty no matter what I did. It just returns [].

I am posting below data in Fiddler :

User-Agent: Fiddler
Content-Type: application/json

{
"parent_id" : "1",
"process_no" : "20",
"process_name" : "Aux Electrical",
"level" : "4",
"priority_no" : "1"
}

I tried to dump $request contents in api.php to no avail.

Route::post('/processtree', function (Request $request){
    return $request->all();
});

I tried all sorts of different versions of reading $request object, again did not work. All I get is [].

Any ideas what might be wrong here?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Maybe reformat your json to a valid one (: instead of =)

{
"parent_id":"1",
"process_no":"20",
"process_name":"Aux Electrical",
"level":"4",
"priority_no":"1"
}
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!