Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to consume rest service?
Message
De
18/11/2019 17:20:32
 
 
À
18/11/2019 14:29:25
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01671919
Message ID:
01671922
Vues:
66
Thank you Dragan.

>>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?
>
>There are several kinds of interfaces where you don't need to send anything, just navigate to an url, with a bunch of parameters, frequently containing the username, unix time, and a hash of the whole url plus password (but not sending the password itself). Then I'd send it using simple httpGetEx() (from wwipstuff/wwutils by Rick) and get a json back. This you can find in their documentation, just check if the service provider has some API - these locations are the API.
>
>Example: https://api.statcounter.com/docs/v3
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform