PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 25
→
WX - Json X httprequest + httpgetresult
WX - Json X httprequest + httpgetresult
Started by BOLLER ADRIANO, Aug., 04 2016 9:39 AM - 3 replies
Connect yourself…
BOLLER ADRIANO
#1
Registered member
3,657 messages
Popularité : +175 (223 votes)
Posted on August, 04 2016 - 9:39 AM
Bonjour,
Endereço: http: // server / ao ar livre / Serviço / api / login
Conteúdo do JSON contendo o usuário e a senha: { "username", "user", "password", "*****"}
A função, em seguida, retorna uma permissão de sessão que será usado para autenticar futuro consultas.
O ticket token é: TICKET_b1ea7f2a00253859999dc27be19faccf6c3c89f7
Para qualquer pedido futuro, você deve então fazer algo parecido com isto:
//Example
CommandeAlfresco est un
HTTPRequête
ReponseAlfresco est un
httpRéponse
CommandeAlfresco.Utilisateur
=
"ROLE_TICKET"
CommandeAlfresco.MotDePasse
=
"TICKET_b1ea7f2a00253859999dc27be19faccf6c3c89f7"
CommandeAlfresco.ContentType
=
"application/json"
CommandeAlfresco.Méthode
=
httpPost
CommandeAlfresco.URL
=
"http://serveur/alfresco/service/api/sites"
//pour lister les sites présent
ReponseAlfresco
=
HTTPEnvoie
(
CommandeAlfresco
)
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Message modified, August, 04 2016 - 9:40 AM
Report
1
1
BOLLER
#2
Registered member
3,657 messages
Popularité : +175 (223 votes)
Posted on August, 11 2017 - 2:18 PM
//-- le o arquivo Json anexado ao projeto --//
gs
PerguntasJson
is ANSI string
=
fLoadText
(
fDataDir
(
)
+
"/questoes.json"
)
gs
PerguntasJson
=
UTF8ToAnsi
(
gs
PerguntasJson
)
//info(gsPerguntasJson)
//-----------------------------------------------------------------------------------------//
//-- agora coloca os dados em um array apos ler a estrrutura e grava na tabela Perguntas --//
//-----------------------------------------------------------------------------------------//
//--estrutura do Json
JsonStru
is structure
pergunta
is ANSI string
resp_a
is ANSI string
resp_b
is ANSI string
resp_c
is ANSI string
resp_d
is ANSI string
resp_e
is ANSI string
resp_f
is ANSI string
resp_g
is ANSI string
resposta
is ANSI string
explicacao
is ANSI string
END
gst
DadosJson
is array of
JsonStru
Deserialize
(
gst
DadosJson
,
gs
PerguntasJson
,
psdJSON
)
//Info( ArrayCount(gstDadosJson))
//Info( gstDadosJson[1].pergunta )
FOR
E
ACH
st
_linha_json OF
gst
DadosJson
Info
(
st
_linha_json.explicacao
)
END
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Report
0
1
Willian Fernando
#3
Registered member
123 messages
Popularité : +46 (46 votes)
Posted on August, 18 2017 - 3:32 PM
Sempre é legal da creditos a quem fez/ajudou ou até mesmo desenvolveu o código, no caso acima eu fiz boa parte do mesmo, com as correções necesarias, inclusive teve outro membro que também colaborou nisso
--
Atte. Willian Fernando
Report
0
0
BOLLER
#4
Registered member
3,657 messages
Popularité : +175 (223 votes)
Posted on August, 18 2017 - 5:10 PM
ok
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Report
0
0
→ Go back to WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text