[luci] luci Digest, Vol 51, Issue 4

Duy Nguyen nkduy2010 at gmail.com
Fri Aug 10 12:53:01 CEST 2012


Oh hi Bryan Mayland, thanks so much for your reply!!

My issue is I want to asynchronously make a request to facebook API to get
a response from it. The URL for the request is like this:
https://graph.facebook.com/me?access_token=[access_token]. I would like to
get the response from Facebook for that request. It is because I want to
use this response for further processing. In Javascript I could do this by
using JSONP to make the request and then use a callback function to catch
the response. But in LuCI, I don't know how to write this kind of code.

Do you know how to deal with that?

Thank you in advance!
Best regards,
Duy Nguyen.




On Fri, Aug 10, 2012 at 5:00 PM, <luci-request at lists.subsignal.org> wrote:

> Send luci mailing list submissions to
>         luci at lists.subsignal.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.subsignal.org/mailman/listinfo/luci
> or, via email, send a message with subject or body 'help' to
>         luci-request at lists.subsignal.org
>
> You can reach the person managing the list at
>         luci-owner at lists.subsignal.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of luci digest..."
>
>
> Today's Topics:
>
>    1. Re: How to make a request and catch its response (in JSON
>       format)? (Bryan Mayland)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 09 Aug 2012 09:30:51 -0400
> From: Bryan Mayland <bmayland at leoninedev.com>
> To: luci at lists.subsignal.org
> Subject: Re: [luci] How to make a request and catch its response (in
>         JSON format)?
> Message-ID: <5023BB8B.7060305 at leoninedev.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 8/9/2012 4:13 AM, Duy Nguyen wrote:
> > I am now stuck in using LuCi API to write a controller to make a
> > request to a certain page asynchronously, and then catch its response
> > (in JSON format) for further processing.
> >
> > I am a very newbie to LuCi so I really need help.
> >
> > Hope that there will be someone who knows how to deal with my problem.
> You can find several examples of doing synchronous JSON requesting and
> parsin by googling "luci require httpclient", but if you need to do it
> asynchronously you'll need to tell us when exactly you're trying to do
> what. Asynchronous to what?
>
> Here are some good examples of synchronous JSON from the fonera folks:
>
> http://svn.fonosfera.org/fon-ng/trunk/luci/libs/uploadd/luasrc/fon/facebook.lua
>
> http://svn.fonosfera.org/fon-ng/trunk/luci/applications/luci-torrent/luasrc/transmission.lua
>
>
> ------------------------------
>
> _______________________________________________
> luci mailing list
> luci at lists.subsignal.org
> https://lists.subsignal.org/mailman/listinfo/luci
>
>
> End of luci Digest, Vol 51, Issue 4
> ***********************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsignal.org/pipermail/luci/attachments/20120810/c9e20463/attachment.html>


More information about the luci mailing list