Home » Community » Newbie corner » skylark with server and client
skylark with server and client [message #56048] |
Tue, 19 January 2021 05:25  |
BetoValle
Messages: 204 Registered: September 2020 Location: Brasil Valinhos SP
|
Experienced Member |
|
|
Hi,
in the application client i run the code (after server)
CONSOLE_APP_MAIN
{
String url = "http://localhost:8001/myapp/qualqueres";
request.Post("id", "1234"); //** < --
request.PostData("1111111");
request.POST();
String content = request.Execute();
Cout() << "return " << content ;
SetExitCode( 0 );
}
in the server application i run the code
SKYLARK(q, "qualqueres:POST")
{
//** "id" ?? "1234" ?? <--
String c = http.GetRequestContent();
http << c;
}
struct MyApp : SkylarkApp {
MyApp() {
root = "myapp";
}
};
CONSOLE_APP_MAIN
{
MyApp().Run();
}
in the application client return the result "1111111".
my question:
in this adaptation I did how to make the parameter "id" and its value "1234"
passed by the client application, be read (evaluated) on the server and returned
to the client application?
(ie how do I read the parameters on the server, passed by the client, without manipulating
the traditional html?)
thanks
|
|
|
Goto Forum:
Current Time: Tue Apr 29 04:38:25 CEST 2025
Total time taken to generate the page: 0.03637 seconds
|