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
© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.