Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [EnsLib] >  [HTTP] >  [OutboundAdapter]
Private  Storage   

class EnsLib.HTTP.OutboundAdapter extends Ens.OutboundAdapter

Adapter for sending HTTP requests to a designated HTTP server, with HTTP headers, URL, form variables and cookies if so invoked

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 17 20


Summary

Properties
%Cookies %CredentialsObj %WarnedLatest BusinessHost
ConnectTimeout Credentials HTTPPort HTTPServer
KeepaliveInterval LocalInterface ProxyHTTPS ProxyHttpTunnel
ProxyPort ProxyServer RegistryID ResponseTimeout
SSLCheckServerIdentity SSLConfig SkipBodyAttrs URL
UseCookies WriteTimeout

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
AssignOneSetting ClearAllAppData ClearRuntimeAppData ClearStaticAppData
CredentialsSet Delete DeleteCookie DeleteCookies
DeleteFormDataArray DeleteURL EnumerateSettingsClose EnumerateSettingsExecute
EnumerateSettingsFetch Get GetFormDataArray GetSettings
GetURL OnInit OnKeepalive OnTearDown
Post PostFormDataArray PostURL Put
PutFormDataArray PutURL SendFormData SendFormDataArray
SendFormDataURL

Subclasses
EnsLib.Siebel.HTTPOutboundAdapter

Parameters

• parameter DEBUG = 0;
This is the debug flag setting (0 do nothing, 1 show request, 2 show request/response)
• parameter SETTINGS = "RegistryID:Basic:selector?context={Ens.ServiceRegistry.External.ContextSearch/Services?Protocols_1=REST&Protocols_2=HTTP},HTTPServer:Basic,HTTPPort:Basic,SSLConfig:Connection:sslConfigSelector,SSLCheckServerIdentity:Connection,LocalInterface:Connection:selector?context={Ens.ContextSearch/TCPLocalInterfaces},ProxyServer:Connection,ProxyPort:Connection,ProxyHTTPS:Connection,ProxyHttpTunnel:Connection,URL:Basic,Credentials:Basic:credentialsSelector,UseCookies,ConnectTimeout:Connection,ResponseTimeout:Connection,WriteTimeout:Connection";
These are the production settings for this object

Properties

• property %Cookies as %String [ MultiDimensional,Transient ];
Array of Cookies. Indexed by Domain/Server; each element is $LB(name, domain, path, value, expires, secure)
• property ConnectTimeout as %Numeric(MINVAL=0) [ InitialExpression = 5 ];
Number of seconds to wait on each connection attempt
• property Credentials as %String [ InitialExpression = "None" ];
This is the ID name of the set of credentials values (Username, Password) to be used to access the HTTP server
• property HTTPPort as %Integer(MAXVAL=65535,MINVAL=0);
TCP Port on the server to send HTTP requests to (will use 80 by default, or 443 if SSLConfig is specified)
• property HTTPServer as %String(MAXLEN=1000) [ Required ];
IP address of the server to send HTTP requests to.
• property LocalInterface as %String(MAXLEN=250);
In a multi-homed system, specify which network interface the TCP connection should go through. An empty value means to use any interface.
To be able to bind to IPv6 interfaces you may need to enable IPv6 in your instance. This is done in the System Management Portal under System Administration > Configuration > Additional Settings > Startup, by editing the IPv6 setting.
• property ProxyHTTPS as %Boolean;
Should the proxy (if any) use HTTPS to communicate with the real HTTP/HTTPS server?
• property ProxyHttpTunnel as %Boolean [ InitialExpression = 0 ];
Should the Adapter use the HTTP CONNECT command to establish a tunnel through the proxy to the target HTTP server?
• property ProxyPort as %Integer(MAXVAL=65535,MINVAL=0);
Proxy server port on which to send HTTP requests, if using a proxy server (will use 8080 by default)
• property ProxyServer as %String(MAXLEN=1000);
Proxy server through which to send HTTP requests, if any
• property ResponseTimeout as %Numeric(MINVAL=-1) [ InitialExpression = 30,Required ];
Timeout for getting a response from the server (the timeout for opening the connection to the server is always 5 seconds). Setting the timeout to -1 means wait forever.
• property SSLCheckServerIdentity as %Boolean [ InitialExpression = 1 ];
When making an SSL connection check the server identity in the certificate matches the name of the system we are connecting to. This defaults to being on and matches based on the rules layed out in section 3.1 of RFC 2818.
• property SSLConfig as %String;
The name of an existing SSL/TLS system configuration set to use (Secure Socket Layer / Transport Layer Security, configured via the system portal's Security Management page).

If your SSL Configuration requires you to supply a password for the local private key file, specify it in the Private key password property of the SSL/TLS Configuration.

• property SkipBodyAttrs as %String [ InitialExpression = "*" ];
A comma-separated list of body stream attribute names that should not be copied to the outbound HTTP header. The default value of "*" means to skip all, i.e. to copy none. If this value is empty and the input stream is a %Library.AbstractStream subclass, then double copying of the stream data will be avoided by passing the stream object directly through to the %Net.HttpRequest.Send() method.
• property URL as %String(MAXLEN=1000) [ Required ];
URL path to request from the server (not including 'http://' or server address)
  • If set to empty or '*' and used on a GenericOperation, this setting will employ the URL attribute value contained in the GenericMessage being processed.
  • If this value starts with '^' and is used on a GenericOperation, this setting will remove the Application attribute from the URL of the GenericMessage being processed and replace it with the remaining portion of this value if any. If combined with '*' the '^' should come first.
  • If this value starts with '|' and is used on a GenericOperation, this setting will remove the Application and ConfigName attributes from the URL of the GenericMessage being processed and replace them with the remaining portion of this value if any. If combined with '*' the '|' should come first.
• property UseCookies as %Boolean [ InitialExpression = 0 ];
Save Cookies received in HTTP responses while this adapter is instantiated, and insert them in each subsequent HTTP request.
• property WriteTimeout as %Numeric(MINVAL=-1) [ InitialExpression = -1 ];
Set this to the timeout to use when writing to the remote HTTP server.
The default is -1 means it will wait indefinitely for the remote server to accept the written data, change it to another value to specify the timeout in seconds.

Methods

• method Delete(Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, pData...) as %Status
Send a DELETE to the configured Server, Port and URL, sending form data to the named form variables. pFormVarNames is a comma-separated list of form variable names to use. To use a request Body instead of form variables, leave pFormVarNames empty and pass the body text as the pData argument. Otherwise, for each name in the list, a pData argument should be supplied. If you need to pass multiple values for any form variable, you can put the name of that variable multiple times in the pFormVarNames list. Also, any extra pData arguments will be assigned to the last form variable in the list. Note: Data values passed for body text may be of either String type or Stream. Data values passed for form variables must be of String type.
• method DeleteCookie(pName As %String, pPath As %String, pDomain As %String) as %Status
Delete a particular Cookie
• method DeleteCookies(pDomain As %String = "", pPath As %String = "") as %Status
Delete all cookies from the specified domain and/or path
• method DeleteFormDataArray(Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, ByRef pData) as %Status
Send a DELETE to the configured Server, Port and URL, sending form data to the named form variables. pFormVarNames is a comma-separated list of form variable names to use. For each name in the list, a pData argument should be supplied. The pData argument is an array. The top node of the array is not used. Each sub-node is subscripted by the index of the form variable from the pFormVarNames list that it corresponds to. The value at that subscript is the form data for that variable. For single-valued form variables this value is just the value. In this case this node should have no sub-nodes. For multiple valued form variables, the value at this node should be the count of form variable values, and each of the values for this form variable should appear in a sub-node, subscripted by its position in the node.
• method DeleteURL(pURL As %String, Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, pData...) as %Status
• method Get(Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, pData...) as %Status
Send a GET to the configured Server, Port and URL, sending form data to the named form variables. pFormVarNames is a comma-separated list of form variable names to use. To use a request Body instead of form variables, leave pFormVarNames empty and pass the body text as the pData argument. Otherwise, for each name in the list, a pData argument should be supplied. If you need to pass multiple values for any form variable, you can put the name of that variable multiple times in the pFormVarNames list. Also, any extra pData arguments will be assigned to the last form variable in the list. Note: Data values passed for body text may be of either String type or Stream. Data values passed for form variables must be of String type.
• method GetFormDataArray(Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, ByRef pData) as %Status
Send a GET to the configured Server, Port and URL, sending form data to the named form variables. pFormVarNames is a comma-separated list of form variable names to use. For each name in the list, a pData argument should be supplied. The pData argument is an array. The top node of the array is not used. Each sub-node is subscripted by the index of the form variable from the pFormVarNames list that it corresponds to. The value at that subscript is the form data for that variable. For single-valued form variables this value is just the value. In this case this node should have no sub-nodes. For multiple valued form variables, the value at this node should be the count of form variable values, and each of the values for this form variable should appear in a sub-node, subscripted by its position in the node.
• method GetURL(pURL As %String, Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, pData...) as %Status
• method OnInit() as %Status
This user callback method is called just after %OnNew()
• method Post(Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, pData...) as %Status
Send a POST to the configured Server, Port and URL, sending form data to the named form variables. pFormVarNames is a comma-separated list of form variable names to use. To use a request Body instead of form variables, leave pFormVarNames empty and pass the body text as the pData argument. Otherwise, for each name in the list, a pData argument should be supplied. If you need to pass multiple values for any form variable, you can put the name of that variable multiple times in the pFormVarNames list. Also, any extra pData arguments you supply will be assigned to the last form variable in the list. Note: A Data value passed for body text may be of either String type or Stream. Data values passed for form variables must be of String type.
• method PostFormDataArray(Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, ByRef pData) as %Status
Send a POST to the configured Server, Port and URL, sending form data to the named form variables. pFormVarNames is a comma-separated list of form variable names to use. For each name in the list, a pData argument should be supplied. The pData argument is an array. The top node of the array is not used. Each sub-node is subscripted by the index of the form variable from the pFormVarNames list that it corresponds to. The value at that subscript is the form data for that variable. For single-valued form variables this value is just the value. In this case this node should have no sub-nodes. For multiple valued form variables, the value at this node should be the count of form variable values, and each of the values for this form variable should appear in a sub-node, subscripted by its position in the node.
• method PostURL(pURL As %String, Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, pData...) as %Status
• method Put(Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, pData...) as %Status
Send a PUT to the configured Server, Port and URL, sending form data to the named form variables. pFormVarNames is a comma-separated list of form variable names to use. To use a request Body instead of form variables, leave pFormVarNames empty and pass the body text as the pData argument. Otherwise, for each name in the list, a pData argument should be supplied. If you need to pass multiple values for any form variable, you can put the name of that variable multiple times in the pFormVarNames list. Also, any extra pData arguments will be assigned to the last form variable in the list. Note: Data values passed for body text may be of either String type or Stream. Data values passed for form variables must be of String type.
• method PutFormDataArray(Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, ByRef pData) as %Status
Send a PUT to the configured Server, Port and URL, sending form data to the named form variables. pFormVarNames is a comma-separated list of form variable names to use. For each name in the list, a pData argument should be supplied. The pData argument is an array. The top node of the array is not used. Each sub-node is subscripted by the index of the form variable from the pFormVarNames list that it corresponds to. The value at that subscript is the form data for that variable. For single-valued form variables this value is just the value. In this case this node should have no sub-nodes. For multiple valued form variables, the value at this node should be the count of form variable values, and each of the values for this form variable should appear in a sub-node, subscripted by its position in the node.
• method PutURL(pURL As %String, Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, pData...) as %Status
• method SendFormData(Output pHttpResponse As %Net.HttpResponse, pOp As %String, pHttpRequestIn As %Net.HttpRequest, pFormVarNames As %String, pData...) as %Status
• method SendFormDataArray(Output pHttpResponse As %Net.HttpResponse, pOp As %String, pHttpRequestIn As %Net.HttpRequest, pFormVarNames As %String = "", ByRef pData, pURL As %String) as %Status
Send a pOp request ("POST","GET" or "PUT") to the configured Server, Port and URL, sending form data to the named form variables. pFormVarNames is a comma-separated list of form variable names to use. For each name in the list, a pData argument should be supplied. The pData argument is an array. The top node of the array is not used. Each sub-node is subscripted by the index of the form variable from the pFormVarNames list that it corresponds to. The value at that subscript is the form data for that variable. For single-valued form variables this value is just the value. In this case this node should have no sub-nodes. For multiple valued form variables, the value at this node should be the count of form variable values, and each of the values for this form variable should appear in a sub-node, subscripted by its position in the node. For special needs, the pHttpRequestIn argument can be used to pre-populate properties of the %Net.HTTPRequest object used to send the HTTP request.
• method SendFormDataURL(pURL As %String, Output pHttpResponse As %Net.HttpResponse, pOp As %String, pHttpRequestIn As %Net.HttpRequest, pFormVarNames As %String, pData...) as %Status


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.