HOW to use PUT with ResourceController? |
I just looked at the IncomingRequest class. The variable $this->body should contain the value returned by 'php://input':
PHP Code: public function __construct($config, URI $uri = null, $body = 'php://input', UserAgent $userAgent) In my opinion, getRawInput() should return $this->body without modification, but instead it return the data using parse_str(), which I think is a little weird: PHP Code: /** In your case, getJSON() should return what you want: PHP Code: /** ...if not, try accessing directly $this->request->body
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/ |
Messages In This Thread |
HOW to use PUT with ResourceController? - by blaasvaer - 12-15-2020, 08:44 AM
RE: HOW to use PUT with ResourceController? - by includebeer - 12-16-2020, 03:38 PM
|