Hello,
Does anyone have a JSON example that includes authentication.
I tried the following but got the error listed below:
//////////////////////////////////////////////////////////////// CODE
#include "FiveWin.ch"
REQUEST DBFCDX
REQUEST DBFFPT
//-----------------------------------------------------------------------------
function Main()
local ohttp := CreateObject( "MSXML2.XMLHTTP" )
local strret
ohttp:Open( "GET" ,"https://www.winwebconnect.com/api/v1/Login", .F. )
ohttp:SetRequestHeader( "Accept" , "application/json" )
ohttp:SetRequestHeader( "Content-Type" , "application/json" )
ohttp:SetRequestHeader( "Username" , "xxx" )
ohttp:SetRequestHeader( "Password" , "xxx" )
strret := alltrim(ohttp:responseText)
MsgInfo( strret )
RETURN 0
//////////////////////////////////////////////////////////////// REPONSE
Application
===========
Path and name: C:\Winapps\cargo\data\winweb.exe (32 bits)
Size: 3,068,928 bytes
Compiler version: Harbour 3.2.0dev (r1306132159)
FiveWin Version: FWH 14.09
Windows version: 6.1, Build 7601 Service Pack 1
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 01/06/17, 14:55:24
Error description: (DOS Error -2147352567) WINOLE/1007 Unspecified error
(0x80004005): msxml3.dll
Stack Calls
===========
Called from: => TOLEAUTO:RESPONSETEXT( 0 )
Called from: winweb.prg => MAIN( 37 )
System
======
CPU type: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz 2717 Mhz
Hardware memory: 32652 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 5
1 ,
2 , C:\Winapps\cargo\data\winweb.exe