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

Structure of parameters in POST

$
0
0
by Jackie Smile.  

Hello, I'm basically hitting the brick wall with this and my other two posts don't get any reply. I can't believe it is that hard. So I'm trying once again with a fresh new start from the ground up.

How can I send data to a webservice using POST? What I'm particularly interested in is how the params structure would look like and their corresponding declaration in the prameters function inside the externallib.php file. I already can distinguish between GET and POST and other stuff, only the parameter description drives me nuts. I would appreciate it very much if someone could post a short example and relieves me from this struggle.

 

Some details

part of my proposed externallib ..._parameters():

...
return new external_function_parameters(
    array(
        'foo' => new external_value(PARAM_TEXT, 'just a test')
    )
)
...

I would expect the params to be something like

$foo= 'bar';
$params=array($foo);

But I always get the "Calling parameters do not match signature" error. i don't know how I could solve this


Viewing all articles
Browse latest Browse all 2364


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