Jump to content

How to receive POST / GET Requests on UniGUI Server?


elGringo

Recommended Posts

Hi ,

 

What am i wrong ? 

if ARequestInfo.URI = '/test' then begin

   //** 500 Internal Server Error 
   cResponseText := Dataset2Json2String( );    // this function is example in UniMainmodule  

   AResponseInfo.ContentType := 'text/html';
   AResponseInfo.ContentText := cResponseText ;
   Handled := true;
end;

<No problem>

On getting a string from any function no relation with DB through in UniMainmodule , it's ok . No problem !! .  

 

<my problem>

But , Trying to get something from function relation with DB in UniMainModule , Occurred - 500 Internal server error - 

 

What am i wrong ? 

and  Is there any idear to get  something( String or record ) from  functions in UniMainModule  onto  UniServerModule ? 

 

May thanks for your kindness .

Link to comment
Share on other sites

Hi !!

 

Forget above about my stupid question .  For a while , I forgot and misunderstood each roles between UniServerModule and  UniMainModule .

I solved this problem .  (  I just added some codes for opening database  in servermodule for Server )

 

As a result , 

I can build any applications   which  needs to be communicated ( set/get any values ) between Unigui and HTML in URLFrame .

Actually , if you want to build like above using URLFRame ,  you have to refresh it URLFrame to confirm any result on html .

but No developers want  it  for opening again .  Ajax has  nice solution  to avoid such as  above problems .

if you handle a little through  OnHttpcommand in UniServerModule ,  You can deal with it  very easily  without refreshing again .

 

We have been given it by Farshard  almost he is like Monster !! .  For many years , He has been trying to finish for what we wanted  for a long time.

( Meanwhile ,  Some guys who are doing illegal  must stop  and  pay  as much as Farshard 's  Sweat, labor )    

 

Many thanks again for UNIGUI , really really nice framework for developing web application using Delphi !!

  • Upvote 1
Link to comment
Share on other sites

  • Administrators

Hi !!

 

Forget above about my stupid question .  For a while , I forgot and misunderstood each roles between UniServerModule and  UniMainModule .

I solved this problem .  (  I just added some codes for opening database  in servermodule for Server )

 

As a result , 

I can build any applications   which  needs to be communicated ( set/get any values ) between Unigui and HTML in URLFrame .

Actually , if you want to build like above using URLFRame ,  you have to refresh it URLFrame to confirm any result on html .

but No developers want  it  for opening again .  Ajax has  nice solution  to avoid such as  above problems .

if you handle a little through  OnHttpcommand in UniServerModule ,  You can deal with it  very easily  without refreshing again .

 

We have been given it by Farshard  almost he is like Monster !! .  For many years , He has been trying to finish for what we wanted  for a long time.

( Meanwhile ,  Some guys who are doing illegal  must stop  and  pay  as much as Farshard 's  Sweat, labor )    

 

Many thanks again for UNIGUI , really really nice framework for developing web application using Delphi !!

 

 

Thank you!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...