We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

$this->request->getPut() does not work (With postman)

Hey,

When i do print_r( $this->request->getPut() ); i get this:

Array ( [------WebKitFormBoundaryYFpH1SM2LulfABbb Content-Disposition:_form-data;_name] => "password"

test1234 ------WebKitFormBoundaryYFpH1SM2LulfABbb--

)

Do someone know why? I cant just $this->request-getPut('password');



145.0k
Accepted
answer

getPut only works with form data send as put. Maybe you want $this->request->getJsonRawBody(true) ?



3.6k

Thanks, that actually helped.

I had to switch my postman to x-www-form-urlencoded insted of form-data and set my content-type to application/x-www-form-urlencoded

)