Version: v0.6.0 - Beta.  We welcome contributors & feedback.  THanks!

Input.remoteAll

Input.remoteAll($httpMethod, $mapOfFieldRules)

Description

Get all input params for the given $httpMethod ('get' or 'post').

This method allows requests from outside the local domain, without a CSRF token.

Each value will be validated per its validation rule. (See Input Validation)

// post data: { userId: 12345, age: 39 }

$data = Input.remoteAll('post', {
    userId: 'id',
    age: 'i|min:1|max:130',
});
//= 12345

if $data.ok {
    print($data.fields);
}
// {
//     userId: 12345,
//     age: 39
// }

See Also