Search: 
Available in: SSL
Rests Class
RESTS Component [IP*Works! SSL V8]

Properties   Methods   Events   Configuration Settings  

The RESTS component can be used to retrieve xml documents from the World Wide Web.

NOTE: What follows is a very short description of the component interfaces. For more information, please consult the help files that come with the respective package.

Remarks

The RESTS component is the SSL-enabled equivalent of the IP*Works! REST component. The main difference is the introduction of a set of new configuration settings, properties and events that deal with SSL security. The SSLProvider configuration setting chooses a security provider subsystem. The SSLEnabledProtocols and SSLCipherStrength configuration settings determine which protocols are enabled and at what security level. The SSLCert property is used to select a client certificate if the server is requesting client authentication. The SSLSecurityFlags configuration setting, together with the SSLServerAuthentication event allow you to check the server identity and other security attributes. Finally, the SSLStatus event provides information about the SSL handshake.

The RESTS component implements a standard REST client with the added option of SSL security.

The component contains a number of properties that map directly to HTTP request headers. All xml data received is parsed by the component and provided to the user through properties such as XPath, XElement, XText, etc. which allow traversal of the document structure. The Header event will provide the HTTP headers as returned by the server.

To receive an XML document, call the Get method with the URL to retrieve specified in the URL parameter. Call the Delete method to delete a resource specified by the URL parameter.

The other two REST operations are for creating and updating resources. Some people wish to use the Post method for creating resources and the Put method for updating resources. Others choose to use the methods vice versa, or just one for both operations. So, you can POST XML data to the HTTP server by assigning it to the PostData property and then calling the Post method. Alternatively, you may use the PUT method instead.

To add authorization credentials to an outgoing request, you should specify the User and Password properties. The RESTS component supports Basic, Digest, and NTLM authentication through the AuthScheme property.

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for complete descriptions.

Accept A list of acceptable MIME types for the request.
AuthScheme The authorization scheme to be used when server authorization is to be performed.
BuildDOM When True, an internal object model of the XML document is created.
Connected Shows whether the component is connected.
ContentType Content type for posts and puts.
Cookies Collection of cookies.
Firewall A set of properties related to firewall access.
FollowRedirects Determines what happens when the server issues a redirect.
From The email address of the HTTP agent (optional).
HTTPMethod The HTTP method used for the request.
Idle The current status of the component.
IfModifiedSince A date determining the maximum age of the desired document.
LocalFile The path to a local file for downloading. If the file exists, it is overwritten.
LocalHost The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
Namespaces A collection of namespaces in the current stack.
OtherHeaders Other headers as determined by the user (optional).
ParsedHeaders Collection of headers returned from the last request.
Password A password if authentication is to be used.
PostData The data to post with the URL if the POST method is used.
Proxy A set of properties related to proxy access.
Referer Referer URL/document (optional).
SSLAcceptServerCert Instructs the component to unconditionally accept the server certificate that matches the supplied certificate.
SSLCert The certificate to be used during ssl negotiation.
SSLServerCert The server certificate for the last established connection.
StatusLine The first line of the last server response.
Timeout A timeout for the component.
TransferredData The contents of the last response from the server.
TransferredDataLimit The maximum of data to be transferred.
TransferredHeaders The full set of headers as received from the server.
URL The URL to post information to.
User A user name if authentication is to be used.
Validate When True, the parser checks that the document consists of well-formed XML.
XAttributes A collection of attributes of the current element.
XChildren Collection of child elements of the current element.
XElement The name of the current element.
XErrorPath An XPath to check in the server response for errors.
XNamespace The namespace of the current element.
XParent The parent of the current element.
XPath Provides a way to point to a specific element in the document.
XPrefix The prefix of the current element.
XSubTree A snapshot of the current element in the document.
XText The text of the current element.

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for complete descriptions.

AddCookie Adds a cookie and the corresponding value to the outgoing request headers.
Attr Returns the value of the specified attribute.
Config Sets or retrieves a component configuration setting.
Delete Deletes an object on the server.
DoEvents Processes events from the internal message queue.
Get Fetch the document using the HTTP GET method.
Interrupt Interrupt the current method.
Post Posts data to the HTTP server using the HTTP POST method.
Put Sends data to the HTTP server using the HTTP PUT method.
Reset Reset the component

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for complete descriptions.

Characters Fired for plain text segments of the input stream.
Comment Fired when a comment section is encountered.
Connected Fired immediately after a connection completes (or fails).
ConnectionStatus Fired to indicate changes in connection state.
Disconnected Fired when a connection is closed.
EndElement Fired when an end-element tag is encountered.
EndPrefixMapping Fired when leaving the scope of a namespace declaration.
Error Information about errors during data delivery.
EvalEntity Fired every time an entity needs to be evaluated.
Header Fired every time a header line comes in.
IgnorableWhitespace Fired when a section of ignorable whitespace is encountered.
Meta Fired when a meta section is encountered.
PI Fired when a processing instruction section is encountered.
Redirect Fired when a redirection is received from the server.
SSLServerAuthentication Fired after the server presents its certificate to the client.
SSLStatus Shows the progress of the secure connection.
SetCookie Fired for every cookie set by the server.
SpecialSection Fired when a special section is encountered.
StartElement Fired when a begin-element tag is encountered in the document.
StartPrefixMapping Fired when entering the scope of a namespace declaration.
Status Fired when the HTTP status line is received from the server.

Configuration Settings


The following is a list of configuration settings for the component with short descriptions. Click on the links for complete descriptions.

AbsoluteTimeout Determines whether timeouts are inactivity timeouts or absolute timeouts.
AcceptAnyServerCert If set the component will accept any certificate presented by the server
AcceptEncoding Used to tell the server which types of content encodings the client supports.
AllowHTTPCompression This property enables HTTP compression for receiving data.
Authorization The Authorization string to be sent to the server.
CacheContent If true, the original XML is saved in a buffer
CloseStreamAfterTransfer If true, the component will close the upload or download stream after the transfer.
CodePage The system code page used for Unicode to Multibyte translations (Windows/COM only).
EncodeURL If set to true the URL will be encoded by the component.
FirewallData Used to send extra data to the firewall.
FirewallListener If true, the component binds to a SOCKS firewall as a server (IPPort only).
From Allows the specification of the email address of the HTTP agent.
GetOn302Redirect If set to true the component will perform a GET on the new location.
HTTPVersion The version of HTTP used by the component
IfModifiedSince A date determining the maximum age of the desired document.
InBufferSize The size in bytes of the incoming queue of the socket.
KeepAlive Determines whether the HTTP connection is closed after the completion of the request.
MaxHTTPCookies Instructs component to save the amount of cookies specified that are returned by the server when a SetCookie event is fired.
MaxHeaders Instructs component to save the amount of headers specified that are returned by the server after a Header event has been fired.
MaxLineLength The maximum amount of data to accumulate when no EOL is found.
OpenSSLCADir The path to a directory containing CA certificates.
OpenSSLCAFile Name of the file containing the list of CA's trusted by your application.
OpenSSLCipherList A string that controls the ciphers to be used by SSL.
OpenSSLPrngSeedData The data to seed the pseudo random number generator(PRNG).
OutBufferSize The size in bytes of the outgoing queue of the socket.
ProxyAuthScheme The authorization scheme to be used for the proxy.
ProxyAuthorization The authorization string to be sent to the proxy server.
ProxyPassword A password if authentication is to be used for the proxy.
ProxyPort Port for the proxy server (default 80).
ProxyServer Name or IP address of a proxy server (optional).
ProxyUser A user name if authentication is to be used for the proxy.
ReuseSSLSession Determines if the SSL session is reused.
SSLCipherStrength The minimum cipher strength used for bulk encryption.
SSLEnabledProtocols Used to enable/disable the supported security protocols.
SSLProvider The name of the security provider to use.
SSLSecurityFlags Flags that control certificate verification
TcpNoDelay Whether or not to delay when sending packets
TransferredDataLimit The maximum number of incoming bytes to be stored by the component.
UseWinInet If set, the WinInet API is used for retrieving the URL
UseWinInetCookies Controls whether to send and accept cookies when making http requests through WinInet
UserAgent Information about the user agent (browser).
WinsockInfo Identifying information about the loaded Winsock stack (Windows only)
WinsockLoaded Loads and unloads Winsock on demand (Windows only)
WinsockMaxDatagramSize Size in bytes of the largest UDP datagram that can be sent or received (Windows only)
WinsockMaxSockets Maximum number of sockets available to a single process (Windows only)
WinsockPath The path to the Winsock DLL used (Windows only)
WinsockStatus The status of the Winsock stack (Windows only)

| About | Privacy Policy | Terms of Use |
© Copyright 2008 /n software inc.