Welcome Guest, Not a member yet? Register   Sign In
RESTful responds and cookies
#1

Is there a way when responding with $this->respond() (RESTful API), to both send a json array and also send a cookie?
For example, if I use $this->response(), I can do

PHP Code:
$this->response->setJSON(['var' => 'value']);

$this->response->setCookie($cookie);

return 
$this->response

is it possible somehow or I can't use RESTful Resource Handling in such cases, I can't find anything about it
Reply


Messages In This Thread
RESTful responds and cookies - by serialkiller - 04-26-2023, 03:32 AM
RE: RESTful responds and cookies - by kenjis - 04-26-2023, 04:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB