We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request::getArgs() can't get data from STDIN when client post JSON / XML to Server. for example: post JSON via angularjs
$http({ url: '/api/task/create', method: "POST", data: JSON.stringify(newTask) }).success(function(data) { console.log(data); }) })
in Action:
$this->request->getArgs(); // got nothing
The text was updated successfully, but these errors were encountered:
额,看源码的我是。
public function getArg($name) { if (isset($_POST[$name])) { return $_POST[$name]; } else if (isset($_GET[$name])) { return $_GET[$name]; } else if (isset($this->_jsonParams[$name])) { return $this->_jsonParams[$name]; } return false; }
看情况必须一个个单独取出来,你的getArgs()漏了参数name。
Sorry, something went wrong.
No branches or pull requests
Request::getArgs() can't get data from STDIN when client post JSON / XML to Server.
for example:
post JSON via angularjs
in Action:
The text was updated successfully, but these errors were encountered: