Web service function in custom plugin to receive json input

Re: Web service function in custom plugin to receive json input

by Benjamin Ellis -
Number of replies: 0
Picture of Particularly helpful Moodlers
Hi,

By payload are you talking about a file or just JSON text? In both cases, you can. For text, you may have to define the parameter as PARAM_RAW. If you are talking a JSON file, then you will have to use the $_FILES global however you will need to define an input parameter for the file even if it is always empty.

Hope that helps.