Yes that totally works but you'll have to manage the HTTP connection and data serialization on your own. Not difficult but reliable HTTP processing takes a bit of effort to get right with XMLHTTP.
Is this a REST service that works with XML? Usually REST services these days work with JSON data and if so you'll also need to deal with JSON encoding/decoding.
FWIW, for those that use West Wind tools there are a number of high level tools built into it for working with REST services specifically as well as all the lower level tools (wwHttp, wwJsonSerializer).
There's a high level `wwJsonServiceClient` class that allows for very easy service access that handles the HTTP and encoding/decoding plus error handling all through a single interface.
wwJsonServiceClient+++ Rick ---
>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?