by Alberto Marin.
![]()
Hi there!,
I am developing a custom web service but I would like to understand what I am doing as sometimes I get lost. So, let's say I have this:
Also I am not implementing any logic in function execute(), but only returning an object like this:
What I need to know is how to pass the parameters to the url because after all my attempts I dont know what else to do. The picture below can show you my error and the url I am using:
public static function execute_parameters() {
return new external_function_parameters([
'params'=>new external_multiple_structure(
new external_single_structure([
'orderby'=>new external_value(PARAM_TEXT,'type of sort'),
'order'=>new external_value(PARAM_TEXT,'sort direction ASC/DESC')
])
)
]);
}
$data = array(
array('message' => 'Hello World!',
'value1' => 'You',
'value2' => 'Did it!!!')
);

In the message error says that I am using an invalid parameter and only arrays are accepted, but how can I send an array in postman? and what kind of array would it be?
Please, any help is welcome!!
I have been googling but not successful.
Thank you