FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Enviar por POST a webservice
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Enviar por POST a webservice
Posted: Fri Jul 22, 2022 07:10 PM
joseluisysturiz wrote:Saludos, tengo una propuesta de un cliente para desarrollar un WEBSERVICE, queria saber sus recomendaciones con FW, si es que es posible usar este lenguaje en dicho desarrollo, algun POST o la informacion para iniciar , gracias... :-)


Estimado JoseLuis,

Si nos detallas las especificaciones que debe proporcionar dicho webservice con mucho gusto te orientamos acerca de como hacerlo usando mod_harbour
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Re: Enviar por POST a webservice
Posted: Fri Jul 22, 2022 07:37 PM

Saludos Antonio, aun cliente no me ha dado las pautas, pero igual quería saber como diseñar un sistema WEBSERVICE para ofrecer este servicio en mi portafolio, he leido algo sobre diseño de webservice, solo quería saber si puedo usar FWH...gracias... :shock:

Dios no está muerto...



Gracias a mi Dios ante todo!
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Enviar por POST a webservice
Posted: Fri Jul 22, 2022 10:04 PM
Estimado Jose Luis,

Si el cliente quiere acceder por https al webservice entonces tienes que usar mod_harbour para que así Apache gestione el protocolo https

Si no quieres usar Apache y necesitas https, entonces tendrías que revisar la contribución c:\harbour\contrib\hbhttpd que soporta https y no necesita Apache

Con FWH puedes proporcionar un webservice (a partir de FWH 22.06) pero solo usando http y no https de momento. No te haria falta Apache.

Aqui tienes un webservice super básico hecho con mod_harbour para que veas lo simple que es:
https://github.com/FiveTechSoft/mod_harbour/blob/master/samples/webservice.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Enviar por POST a webservice
Posted: Sat Jul 23, 2022 09:26 AM
Ruth wrote:
Antonio Linares wrote:César,

Estos son los ejemplos incluidos con mod_harbour para enviar un fichero y luego salvarlo:

https://github.com/FiveTechSoft/mod_harbour/blob/master/samples/sendfile.prg

https://github.com/FiveTechSoft/mod_harbour/blob/master/samples/upload.prg


Dear Antonio,

please can you help me with the sendfile.prg & upload.prg example above.
When I open my uploaded img file it seems to be corrupt and it seems to have another encoding as the original jpg offline.
https://onedrive.live.com/?cid=A2B81CE57637B150&id=A2B81CE57637B150%2163656&parId=root&parQt=sharedby&o=OneUp


Many thanks in advance and kind regards
Ruth


Dear Ruth,

You are totally right and we do appreciate your great feedback. That javascript code that I grabbed somewhere (I don't remember where) and modified a little, corrupts portions of what is sent. No idea why :-)

I guess that we need to look for other routines that work as expected

best regards
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 179
Joined: Fri Dec 07, 2007 01:26 PM
Re: Enviar por POST a webservice
Posted: Mon Jul 25, 2022 06:56 AM

Dear Antonio, thank you very much. Looking forward to the new routine and sending kind regards,
Ruth

Continue the discussion