Use Outside the Cloud
When not being called from within a DMP Component, the dmp module does not give you additional functionality over that supplied by mmhttp. However, some users may find it useful to use the dmp module outside the cloud when writing libraries to work inside and outside the cloud.
You can use dmpiniturl to initialize a DMP resource with a set of user-supplied authorization headers, and then make HTTP requests to that resource using dmphttp functions. For example, if you have a local webservice with the URL http://localhost:8860/ that requires a cookie for authorization, you can call it as follows:
declarations myurl: dmpresource headers: dynamic array(set of string) of text end-declarations headers("Cookie") := "SESSIONID=8364825249" dmpiniturl(myurl, "http://localhost:8860/", headers) if myurl.status<>DMP_OK then writeln('ERROR: ',myurl.lasterror) exit(1) end-if httpStatusCode := dmphttpget(myurl,'/rest/runtime/status','result.json') if httpStatusCode<>200 then writeln('Error returned from webservice request: ',httpStatusCode) exit(1) end-if