Function from mod_harbour to Harbour

Function from mod_harbour to Harbour

Postby Ari » Fri Apr 28, 2023 4:55 pm

Hey guys

Are there these functions in Harbour :?:

Code: Select all  Expand view  RUN

AP_HeadersIn()
AP_Body()
AP_GetPairs()
AP_PostPairs()
AP_GetEnv()
 
Thanks,
Ari

FWH 2212 - Harbour 3.2.0 - Embarcadero 7.43 - MySQL
São Paulo - SP - Brasil
www.sisrev.com.br
User avatar
Ari
 
Posts: 234
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil

Re: Function from mod_harbour to Harbour

Postby Ari » Fri Apr 28, 2023 5:39 pm

Code: Select all  Expand view  RUN

      /* mod_harbour            Harbour        */
      AP_GetEnv()               hb_GetEnv() - ok
 
Thanks,
Ari

FWH 2212 - Harbour 3.2.0 - Embarcadero 7.43 - MySQL
São Paulo - SP - Brasil
www.sisrev.com.br
User avatar
Ari
 
Posts: 234
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil

Re: Function from mod_harbour to Harbour

Postby Ari » Fri Apr 28, 2023 5:57 pm

:D

Here is the source code

Code: Select all  Expand view  RUN

https://github.com/FiveTechSoft/mod_harbour/blob/master/source/in.c
 


Congratulations Antonio!
Thanks,
Ari

FWH 2212 - Harbour 3.2.0 - Embarcadero 7.43 - MySQL
São Paulo - SP - Brasil
www.sisrev.com.br
User avatar
Ari
 
Posts: 234
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil

Re: Function from mod_harbour to Harbour

Postby Ari » Fri Apr 28, 2023 6:24 pm

I wasn't able to "

It lacks knowledge to assemble, it uses Apache's Lib and a compilation error appears..

:cry:
Thanks,
Ari

FWH 2212 - Harbour 3.2.0 - Embarcadero 7.43 - MySQL
São Paulo - SP - Brasil
www.sisrev.com.br
User avatar
Ari
 
Posts: 234
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil

Re: Function from mod_harbour to Harbour

Postby Antonio Linares » Fri Apr 28, 2023 6:38 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Function from mod_harbour to Harbour

Postby Ari » Fri Apr 28, 2023 6:38 pm

:roll:

Explaining my intentions: I set up a REST API with harbor for my Desktop Application, because there are many business rules that are impossible to redo in another language, so I take system functions and return them to the Browser, so far it's working.

Now I would like to control authentication via Token or another way to validate access. and HB_EetEnv() cannot get the Body or the Header.

I already use the above functions in mod_harbour for another purpose, which is conversion from Sisrev-Win to Sisrev-Web. There it works perfectly.

Now in this project, it's for a website that has a shopping cart and I need authentication and order data in the body.

Grateful
Thanks,
Ari

FWH 2212 - Harbour 3.2.0 - Embarcadero 7.43 - MySQL
São Paulo - SP - Brasil
www.sisrev.com.br
User avatar
Ari
 
Posts: 234
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil

Re: Function from mod_harbour to Harbour

Postby Ari » Fri Apr 28, 2023 8:14 pm

Antonio,

I haven't tested them all, the AP_HeadersIn() didn't work

I pasted it from the in.prg and compiled the AP_Body() test ok it worked.

Code: Select all  Expand view  RUN


  function AP_HeadersIn()          ;  return hHeadersIn
   
 
Thanks,
Ari

FWH 2212 - Harbour 3.2.0 - Embarcadero 7.43 - MySQL
São Paulo - SP - Brasil
www.sisrev.com.br
User avatar
Ari
 
Posts: 234
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests