[Klone-users] Create request
thomas fossati
tho at koanlogic.com
Mon May 4 14:52:41 EDT 2009
Hi Mickael,
On May 4, 2009, at 6:07 PM, Mickael Auger wrote:
> Hi KLone team,
>
> I wish create a HTTP request to get a Web page of another server
> from a KL1 page.
> I have two servers that communicate with each.
>
> For example :
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Server 1:
> - page1.kl1
>
> Server 2 :
> - page2.kl1
>
> "page1.kl1" gets "page2.kl1" (to transform or filter XML data) with
> "page2.kl1" delivers a XML page.
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> What functions can I use ?
so you need to speak a little bit of client side HTTP from inside a
kl1 page.
Basically you have two options:
(1) use off-the-shelf HTTP library code (e.g. libcurl);
(2) create the client code you need by yourself by reusing klone
internal mechanisms (libio/libpage).
The choice depends on (at least) two factors: the complexity of your
protocol (i.e. basic GET/POST over HTTP/S vs ...), and the need to
minimize the size of your executables.
Implementing (2) should be roughly 200/300 lines of C code - which
means a non-significant increment in overall size.
On the other side, doing (1) with libcurl can be 1/5 of complexity but
a 2M increment if you link it statically ...
The choice is up to you :) anyway, if you decide to go for (1) and
need some hint/help, just ask !
ciao, t.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20090504/cd0a21d2/attachment.html
More information about the klone-users
mailing list