Antetodo gracias por responder, he utilizado muchas funciones diferentes pero ninguna funciona,
aqui las que he probado pero nada
function test(othis)
local cUrl:="",oHttp:="",oIE:=nil,cbody:="",i:=0
cUrl:="https://maps.googleapis.com/maps/api/geocode/xml?address=calle juan de cervantes 38"
//cUrl:="http://server/leaflet/html/index.html?latfrom=37.899926&lngfrom=-4.731114&latto=37.587115"
cUrl:="http://www.simjcloud.com/testing/leaflet/html/index.html?latfrom=37.899926&lngfrom=-4.731114&latto=37.587115&lngto=-4.639551"
oIE := CREATEOBJECT( "InternetExplorer.Application" )
WITH OBJECT oIE
:Visible := .f.
:ToolBar := .f.
:StatusBar := .f.
:MenuBar := .f.
:FullScreen := .f.
:Left:=150
:Top:=150
:Invoke( "Navigate", cURL )
END WITH
Do While oIE:Busy
SysWait(1)
SysRefresh() // To Refresh
Loop
Enddo
for i:=1 to 999
othis:insertlog(allstr(i))
SysRefresh()
next
try
cBody := oIE:Document:body:innerText
catch
cBody := ""
end catch
msginfo(cbody)
return
function test1()
local oHttp:=nil,cUrl:="http://www.simjcloud.com/testing/leaflet/html/index.html?latfrom=37.899926&lngfrom=-4.731114&latto=37.587115&lngto=-4.639551"
oHttp:=CreateObject("winhttp.winhttprequest.5.1")
oHttp:SetTimeouts(30000,30000,30000,30000)
oHttp:Open("GET",cUrl,.F.)
//oHttp:SetRequestHeader("Authorization","Basic dXNlcjpwYXNzd29yZA==") // BASE64 de "user:password"
//oHttp:SetRequestHeader("Credentials","user:password")
oHttp:Send('{ "Username": "user@company.com", "Password": "secret"}')
oHttp:waitForResponse()
msginfo(oHttp:ResponseText)
return
function test2(othis)
Local oHttp,i:=0
Try
oHttp := CreateObject( 'MSXML2.XMLHTTP' )
Catch
oHttp := CreateObject( 'Microsoft.XMLHTTP' )
End
oHttp:Open( 'GET', "http://www.simjcloud.com/testing/leaflet/html/index.html?latfrom=37.899926&lngfrom=-4.731114&latto=37.587115&lngto=-4.639551", .F. )
//oHttp:SetRequestHeader( "Content-Type","application/json")
oHttp:Send( '{ "latfrom": "37.899926", "lngfrom": "-4.731114","latto": "37.899926", "lngto": "-4.731114"}' )
SysRefresh()
for i:=1 to 999
othis:insertlog(allstr(i))
SysRefresh()
next
MsgInfo(oHttp:ResponseBody)
return
//
http://server/leaflet/html/index.html?l ... =-4.639551function test3(othis)
local cURL:="http://www.simjcloud.com/testing/leaflet/html/index.html"
local oServer:=nil
oServer := CreateObject( "MSXML2.XMLHTTP")
oServer:Open( "POST", cURL, .F. )
oServer:SetRequestHeader( "Content-Type" , "application/json" )
oServer:SetRequestHeader( "latfrom","37.899926")
oServer:SetRequestHeader( "lngfrom","-4.731114")
oServer:SetRequestHeader( "latto","37.587115")
oServer:SetRequestHeader( "lngto","-4.639551")
// oServer:SetRequestHeader( "ClientAPI_ID" , ::cID )
// oServer:SetRequestHeader( "ClientAPI_Key", ::cKey )
//oServer:SetRequestBody( cBody )
oServer:Send( cURL )
MSGINFO(oServer:readyState)
DO WHILE oServer:readyState <> 2
SYSWAIT()
ENDDO
MSGINFO(oServer:readyState)
msginfo(oServer:responseText)
return