Yate Community Forum

Yate server => Other Yate server issues => Topic started by: rukavinamilan on March 16, 2018, 01:35:43 PM

Title: Javascript http request
Post by: rukavinamilan on March 16, 2018, 01:35:43 PM
I was reading docs but I cannot find a way to make http request from javascript (fetch api)? Or at least call from javascript shell (curl) to do so?

Thanks
Title: Re: Javascript http request
Post by: Monica Tepelus on March 20, 2018, 06:34:36 AM
Hi,

You can't do the actual call from javascript because javascript is embedded in Yate, and yate doesn't have http support. What you can do is have an external php script, with a handler for a custom message. Ex: http.request. Send the message from javascript and let the php scrit do the call.
Title: Re: Javascript http request
Post by: rukavinamilan on March 29, 2018, 11:22:32 AM
Thanks Monica!
I'm aware of that option, but that's seems suboptimal, since javascript seems to work fast since it does not depend on external module...being able to make http request or shell exec would make it very flexible.

Thanks!
Title: Re: Javascript http request
Post by: asymetrixs on April 03, 2018, 01:25:48 PM
The javascript interpreter is custom build, so it lacks lots of functionality that e.g. V8 would offer, because it was specifically for use with yate.