I am using mason to call an API(web based, I can use GET to call it) so that a json file can be returned.
I know m->comp()
can be used inside. But what function can be used externally?
I am using mason to call an API(web based, I can use GET to call it) so that a json file can be returned.
I know m->comp()
can be used inside. But what function can be used externally?
Sounds like you want to make an http request to an external url. Since you're just embedding perl in html you could just have a perl block that uses HTTP::Request and LWP::UserAgent to make that request. Something like this:
Then have HTML::Mason do whatever you want it to do with the json
$data