anonymous Log in
Search
Recents:
v3.0
internet-l
Dúvida HttpClient
04/02/19 16:23

thalyson

Replies: 1


Olá, sou novo no genexus, e estou tentando consumir a API de "Distance
Matrix" do google.
Estou fazendo assim:
&HttpClient.Secure = 1
&HttpClient.Host = 'https://maps.googleapis.com/'
&text = 'http://maps.googleapis.com/' +
'maps/api/distancematrix/json?units=imperial&origins='+ &Lat +
'&destinations=' + &Long + '&key=' + &ApiKey
&HttpClient.Execute('Get',&text)
Se eu tento acessar a url que está na variável &text, no navegador, dá
certo. Mas pelo genexus, recebo a seguinte mensagem de erro: The remote
name could not be resolved: 'https'
Alguém sabe o que estou fazendo errado ?
Grato,
Thalyson
-----------------------------------------
Para Suscribirse/Desuscribirse:
http://www.gxtechnical.com/cgi-bin/hforum.exe?2,3,30,17
Por consultas owner-internet-l@gxtech.com.uy
Replies

desenvolvimento11775

05/02/19 08:00
Bom dia, Acredito que o host seja o endereço: maps.googleapis.com se você especificar &HttpClient.Secure = 1 o genexus se encarregará de chamar como 'HTTPS', se não especificar o secure ele chamará como 'HTTP' que é o protocolo. att Miguel Em ter, 5 de fev de 2019 às 02:25, Thalyson Evilasio Brandao Lopes < thalyson@oportuna.com.br> escreveu: > Olá, sou novo no genexus, e estou tentando consumir a API de "Distance > Matrix" do google. > > > > Estou fazendo assim: > > > > &HttpClient.Secure = 1 > &HttpClient.Host = 'https://maps.googleapis.com/' > > &text = 'http://maps.googleapis.com/' + > 'maps/api/distancematrix/json?units=imperial&origins='+ &Lat + > '&destinations=' + &Long + '&key=' + &ApiKey > > &HttpClient.Execute('Get',&text) > > > > Se eu tento acessar a url que está na variável &text, no navegador, dá > certo. Mas pelo genexus, recebo a seguinte mensagem de erro: The remote > name could not be resolved: 'https' > > > > Alguém sabe o que estou fazendo errado ? > > > > Grato, > > Thalyson > -- Miguel Gonçalves Microsia Consultoria e Sistemas LTDA-ME 22 3824-3383 ----------------------------------------- Para Suscribirse/Desuscribirse: http://www.gxtechnical.com/cgi-bin/hforum.exe?2,3,30,17 Por consultas owner-internet-l@gxtech.com.uy


Back to internet-l