Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to consume rest service?
Message
De
18/11/2019 11:15:17
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
How to consume rest service?
Divers
Thread ID:
01671919
Message ID:
01671919
Vues:
84
Hello all,

I did some searches. and I found some code

Example of making REST GET method call

xmlHttp = CREATEOBJECT("MSXML2.ServerXMLHTTP")
xmlHttp.open("GET", "put url with parameters here", null)
xmlHttp.setRequestHeader("Content-Type", "text/xml")
xmlHttp.send("")
result = xmlHttp.responseText
? result


Example of making REST POST method call

xmlHttp = CREATEOBJECT("MSXML2.ServerXMLHTTP")

xmlHttp.open("POST", "put URL here", null)
xmlHttp.setRequestHeader("Content-Type", "text/xml")
xmlHttp.send("put string to send in body")
result = xmlHttp.responseText
? result


Should I do my tests with those lines of code or is there something else? a better way to do it?
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform