Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

how to send params using postman

$
0
0
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:
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')
                                           ])
                                )
                    ]);
       }
Also I am not implementing any logic in function execute(), but only returning an object like this:
$data = array(
            array('message' => 'Hello World!',
                'value1' => 'You',
                'value2' => 'Did it!!!')
           );
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:




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

Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>