FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour Peticiones POST GET
Posts: 1818
Joined: Wed Oct 26, 2005 02:49 PM

Peticiones POST GET

Posted: Thu Apr 01, 2021 12:22 PM

Buenos días para todos.

En estos días iniciaré con el aprendizaje en mod_harbour, lo primero que deseo hacer es reemplazar un pequeño web service que tengo montado en php. Me gustaría de momento saber como hago para recibir peticiones de tipo GET, POST las cuales vienen con información de cabecera authorization: Basic y un archivo json adjunto.

De antemano gracias,

Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Peticiones POST GET

Posted: Thu Apr 01, 2021 02:14 PM
Leandro,

Ejemplo de webservice simple usando mod_harbour:
https://github.com/FiveTechSoft/mod_harbour/blob/master/samples/webservice.prg

Usando el webservice anterior desde mod_harbour:
https://github.com/FiveTechSoft/mod_harbour/blob/master/samples/callwebservice.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: Peticiones POST GET

Posted: Tue Oct 05, 2021 09:26 PM

Hello friends,
maybe someone can help me.

This example works when I call the web service on the modharbour.org server.
But it doesn't work when I put the link on my server.
Do you have to set something on the server so that it is allowed?
Best regards,
Otto

This is not working.
curl_easy_setopt( hCurl, HB_CURLOPT_URL, "https://winhotel.space/samples/webservice.prg" )

This is working fine.
curl_easy_setopt( hCurl, HB_CURLOPT_URL, "http://www.modharbour.org/modharbour_samples/webservice.prg" )

Continue the discussion