RMNet function calls All the calls except NetGetError, NetCleanup, and NetFree return a which, when nonzero, the string Free the errorpointer with NetFree. HttpPost This function initiates an HTTP POST request and waits for a response. The HTTP POST method is used to submit data to be processed by the identified resource. The data is included in the body of the request. call "HttpPost" using destination-url content-type request-pointer response-pointer [extra-headers] destination-url content-type request-pointer response-pointer extra-headers An alphanumeric item specifying the target URL for the POST. An alphanumeric item specifying the value of the ContentType HTTP header variable. A pointer to an alphanumeric item whose value comprises the content of the POST. A pointer to an alphanumeric item specifying the value of the HTTP response. After use, use NetFree to return memory used to store response. An optional alphanumeric item specifying extra headers to be added to the HTTP header. This argument consists of name/value pairs separated by hex x 00, and ended with two x 00 s. HttpGet This function initiates an HTTP GET request and waits for a response. The HTTP GET method is used to request a representation of the specified resource. call "HttpGet" using 1
destination-url response-pointer [extra-headers] destination-url response-pointer extra-headers An alphanumeric item specifying the target URL for the GET. A pointer to an alphanumeric item specifying the value of the HTTP response. After use, use NetFree to return memory used to store response. An optional alphanumeric item specifying extra headers to be added to the HTTP header. This argument consists of name/value pairs separated by hex x 00, and ended with two x 00 s. HttpGetReturnCode This function is used to return the three-digit HTTP status code from the last HTTP request. call "HttpGetReturnCode" using http-return-code http-return-code A three-digit RFC2616 compliant http status code. A status code that if nonzero the request encountered an error. HttpSetCookieFile This function will enable cookies in the current RMNet session and, optionally, can specify the location of a file used to store and retrieve cookies in Mozilla or Netscape cookie format. call "HttpSetCookieFile" [using cookie-file] 2
cookie-file An optional alphanumeric item specifying the location of a file used to store and retrieve cookies in Mozilla or Netscape cookie format. You may repeat the call for multiple cookie files. If given a blank or bad cookie-file then the call will merely enable Cookies for the current RMNet session. HttpSetEncoding This function sets the contents of the Accept-Encoding header sent in an HTTP request, and enables decoding of a response when a Content-Encoding header is received. This is a request, not an order; the server may or may not do it. call "HttpSetEncoding" [using encode-type] encode-type An optional alphanumeric item specifying the supported HTTP content encoding type. Three encodings are supported: "identity", which does nothing, "deflate" which requests the server to compress its response using the zlib algorithm, and "gzip" which requests the gzip algorithm. If the encode-type argument is not supplied, then an Accept-Encoding header containing all supported encodings is sent. HttpSetResponseHeader This function will enable or disable the inclusion of HTTP response headers in the XML response document. call "HttpSetResponseHeader using http-header-flag 3
http-header-flag A numeric item. If this item is set to "1" the HTTP response headers will be included in the XML output. This function must be called again with httpheader-flag set to "0" to disable the inclusion of HTTP response headers. NetInit This function initializes the RMNet session and must be called before any other RMNet calls; otherwise, an error code will be returned in call "NetInit" A status code that if nonzero the request encountered an error. NetCleanup This function frees up all of the resources owned by an RMNet session. If you call this, and wish to create another RMNet session, you must call NetInit again. Any response and error pointers retrieved by NetGetError and the Get/Post functions must be freed by the caller. call "NetCleanup". NetSetProxyServer This function will set the HTTP proxy to use. Error codes will be returned in call "NetSetProxyServer" using 4
proxy-server proxy-server An alphanumeric item specifying the host name or dotted IP address of proxy server. To specify the port number, append :[port] to the end of the host name. NetSetSSLCA This function is used to specify a file containing one, or more, certificates of public Certificate Authorities. The certificates must be in PEM format. call "NetSetSSLCA" using public-ca-file public-ca-file An alphanumeric item specifying the location of a file containing accepted public certificate authorities. (Default: ca-bundle.crt supplied in the zip file.) NetSetSSLCert This function is used to specify the location of a file containing a client-side Secure Sockets Layer (SSL) certificate. call "NetSetSSLCert" using public-cert-file 5
public-cert-file An alphanumeric item specifying the location of a file containing a PEM formatted certificate. NetSetSSLKey This function is used to specify the location of a file containing a Sockets Layer (SSL) private key file. The private key file must be in PEM format. call "NetSetSSLKey" using private-key-file private-key-file An alphanumeric item specifying the location of a file containing the file name of a PEM formatted private key. NetSetKeyPassword This function is used to specify the password required to load your SSL private key file. call "NetSetKeyPassword" using private-key-password private-key-password An alphanumeric item containing the password required for your SSL private key. 6
NetSSLVerifyPeer Micro Focus This function will enable or disable the SSL peer verification. This will determine whether RMNet verifies the authenticity of the peer s certificate, i.e. that you can trust that the server is who the certificate says it is. This trust is based on a chain of digital signatures, rooted in certification authorities located in your certificate authorities bundle. call "NetSSLVerifyPeer using SSL-verifypeer-flag SSL-verifypeer-flag A numeric item. If this item is set to "1" RMnet will verify the authenticity of the peer s certificate (default), if set to 0, peer certificate authenticity will not be verified. NetGetError This function is used to return the text of an error from the last RMNet operation. call "NetGetError" error-pointer. error-pointer A pointer to an alphanumeric item describing the error that occurred during the transaction, if any. After use, use NetFree to return memory used to store response. NetFree This function is used to free the memory of a pointer given by RMNet. 7
call "NetFree" using pointer-to-free. pointer-to-free A pointer given by RMNet that caller wishes to free. Use this function only for pointers that have been given to caller by RMNet. 8