Jump to content

Hi, I'm following that Rest api tut from phalcon.

 

So I'm trying to get the POST data from the request. but it's empty.

 

$postdata = $app->request->getJsonRawBody();

And if I do

var_dump($postdata);

It's always emtpy

$app->post(
    "/api/test/account",
    function () use ($app) {

thats the start, and the errors I get are only saying that $postdata->user is empty.

 

How do I fix this? I'm soon going away from Phalcon since I do not understand anything and most of the tutorials are waaay above my learning level as they do not really explain much.

Back-end developer, electronics "hacker"

Link to comment
https://linustechtips.com/topic/759276-php-phalcon-get-post-data/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×