Consuming a Restful Web Service in Fivewin.

Consuming a Restful Web Service in Fivewin.

Postby byron.hopp » Wed Dec 02, 2015 4:50 am

Second post, I was thinking I didn't state my question clearly.

I would think that working with restful web services would be very popular to fivewin programmers.
Is anybody doing this.

I have been playing around with WinHttp.WinHttpRequest.5.1 but this seems old.
The SetCredentials doesn't work past Windows XP.

This seems like it would be the pathway to Web Based Win-Forms Applications.
Is this possible right now in Fivewin, or does something need to be developed.

Thanks,

Byron ...
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: Consuming a Restful Web Service in Fivewin.

Postby nageswaragunupudi » Wed Dec 02, 2015 5:52 am

I know this much that there are some programmers who used Fivewin successfully with REST.
I also understand FWH as such is adequate for this without any external libs.
Those programmers with experience in this subject may be able to throw more light on this.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Consuming a Restful Web Service in Fivewin.

Postby anserkk » Wed Dec 02, 2015 6:42 am

viewtopic.php?f=6&t=25471&hilit=%27MSXML2.XMLHTTP%27

Code: Select all  Expand view
  Try
        oOle := CreateObject( 'MSXML2.XMLHTTP' )
    Catch
        oOle := CreateObject( 'Microsoft.XMLHTTP' )
    End
    oOle:Open( 'GET', "YourURL", .f. )
   
    oOle:SetRequestHeader( "Content-Type","application/json") /* if its json*/

    oOle:SetRequestHeader( "Authorization","YourAuthorization Key")
   
    oOle:Send( cJson )
    SysRefresh()
   cRet := oOle:ResponseBody /* Result from the Server*/


It will depend on the RESTful service that you are going to use. For eg the parameters that it expects in the header. Depending on that you may have to use the appropriate value in the oOle:SetRequestHeader()

Hope it is clear.

Regards

Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Consuming a Restful Web Service in Fivewin.

Postby byron.hopp » Wed Dec 02, 2015 8:17 pm

Thank you both for the response.
I will start messing around with the example.

Śubh krisamas
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 104 guests

cron