Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Today's Messages (on)  | Unanswered Messages (off)

Forum: Newbie corner
 Topic: skylark with server and client
skylark with server and client [message #56048] Tue, 19 January 2021 05:25
BetoValle is currently offline  BetoValle
Messages: 74
Registered: September 2020
Location: Brasil Valinhos SP
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








Current Time: Tue Jan 19 09:38:22 CET 2021

Total time taken to generate the page: 0.01153 seconds