Rest ActiveX Reference Documentation

Rest

API for implementing RESTful Web API's.

Object Creation

(Visual Basic 6.0)
Dim obj As New ChilkatRest

(ASP)
set obj = Server.CreateObject("Chilkat_9_5_0.Rest")

(VBScript)
set obj = CreateObject("Chilkat_9_5_0.Rest")

(Delphi)
obj := TChilkatRest.Create(Self);

(FoxPro)
loObject = CreateObject('Chilkat_9_5_0.Rest')

(PowerBuilder)
lole_object = create oleobject
li_rc = lole_object.ConnectToNewObject("Chilkat_9_5_0.Rest")

(SQL Server)
EXEC @hr = sp_OACreate 'Chilkat_9_5_0.Rest', @obj OUT

(Javascript)
var obj = new ActiveXObject("Chilkat_9_5_0.Rest");

Properties

AllowHeaderFolding As Long

Introduced in version 9.5.0.63

If this property is set to 0, then no MIME header folding will be automatically applied to any request header. The default is 1. This property is provided to satisfy certain providers, such as Quickbooks, that require all MIME headers to be single unfolded lines regardless of length.

AllowHeaderQB As Long

Introduced in version 9.5.0.59

Controls whether non us-ascii HTTP request headers are automatically Q/B encoded. The default value is 1.

Q/B encoded headers explicitly indicate the charset and byte representation, and appear as such: =?utf-8?Q?...?= or =?utf-8?B?...?=, where the charset may be "utf-8" or any other possible charset.

If this property is set to 0, then no Q/B encoding is applied to any request header.

Authorization As String

Introduced in version 9.5.0.58

The value of the Authorization HTTP request header (if needed).

ConnectFailReason As Long (read-only)

Introduced in version 9.5.0.58

If the Connect method fails, this property can be checked to determine the reason for failure.

Possible values are:

0 = success

Normal (non-SSL) sockets:
1 = empty hostname
2 = DNS lookup failed
3 = DNS timeout
4 = Aborted by application.
5 = Internal failure.
6 = Connect Timed Out
7 = Connect Rejected (or failed for some other reason)

SSL/TLS:
100 = TLS internal error.
101 = Failed to send client hello.
102 = Unexpected handshake message.
103 = Failed to read server hello.
104 = No server certificate.
105 = Unexpected TLS protocol version.
106 = Server certificate verify failed (the server certificate is expired or the cert's signature verification failed).
107 = Unacceptable TLS protocol version.
109 = Failed to read handshake messages.
110 = Failed to send client certificate handshake message.
111 = Failed to send client key exchange handshake message.
112 = Client certificate's private key not accessible.
113 = Failed to send client cert verify handshake message.
114 = Failed to send change cipher spec handshake message.
115 = Failed to send finished handshake message.
116 = Server's Finished message is invalid.

ConnectTimeoutMs As Long

Introduced in version 9.5.0.71

The maximum amount of time to wait for the connection to be accepted by the HTTP server.

Note: Suprisingly, this property was forgotten and not added until Chilkat v9.5.0.71.

DebugLogFilePath As String

If set to a file path, causes each Chilkat method or property call to automatically append it's LastErrorText to the specified log file. The information is appended such that if a hang or crash occurs, it is possible to see the context in which the problem occurred, as well as a history of all Chilkat calls up to the point of the problem. The VerboseLogging property can be set to provide more detailed information.

This property is typically used for debugging the rare cases where a Chilkat method call hangs or generates an exception that halts program execution (i.e. crashes). A hang or crash should generally never happen. The typical causes of a hang are:

  1. a timeout related property was set to 0 to explicitly indicate that an infinite timeout is desired,
  2. the hang is actually a hang within an event callback (i.e. it is a hang within the application code), or
  3. there is an internal problem (bug) in the Chilkat code that causes the hang.

HeartbeatMs As Long

Introduced in version 9.5.0.58

This property is only valid in programming environment and languages that allow for event callbacks.

Specifies the time interval in milliseconds between AbortCheck events. A value of 0 (the default) indicate that no AbortCheck events will fire. Any REST method can be aborted via the AbortCheck event.

Host As String

Introduced in version 9.5.0.58

The value of the Host HTTP request header.

IdleTimeoutMs As Long

Introduced in version 9.5.0.58

The maximum amount of time to wait for additional incoming data when receiving, or the max time to wait to send additional data. The default value is 30000 (30 seconds). This is not an overall max timeout. Rather, it is the maximum time to wait when receiving or sending has halted.

LastBinaryResult As Variant (read-only)

Introduced in version 9.5.0.52

The binary data returned by the last (binary data returning) method called. Only available if Chilkat.Global.KeepBinaryResult is set to 1. This provides a means for obtaining large varbinary results in the SQL Server environment (where limitations exist in getting large amounts of data returned by method calls, but where temp tables can be used for binary properties).

LastErrorHtml As String (read-only)

Provides information in HTML format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.

LastErrorText As String (read-only)

Provides information in plain-text format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.

Concept of LastErrorText

LastErrorText Standard Information

LastErrorXml As String (read-only)

Provides information in XML format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.

LastMethodSuccess As Long

Introduced in version 9.5.0.52

Indicate whether the last method call succeeded or failed. A value of 1 indicates success, a value of 0 indicates failure. This property is automatically set for method calls. It is not modified by property accesses. The property is automatically set to indicate success for the following types of method calls:

  • Any method that returns a string.
  • Any method returning a Chilkat object, binary bytes, or a date/time.
  • Any method returning a standard boolean status value where success = 1 and failure = 0.
  • Any method returning an integer where failure is defined by a return value less than zero.

Note: Methods that do not fit the above requirements will always set this property equal to 1. For example, a method that returns no value (such as a "void" in C++) will technically always succeed.

LastRequestHeader As String (read-only)

Introduced in version 9.5.0.58

The full MIME header (not including the HTTP start line which contains the status code and status text), of the last request sent.

LastRequestStartLine As String (read-only)

Introduced in version 9.5.0.58

The full start line of the last request sent. (The start line begins with the HTTP verb, such as GET, POST, etc., is followed by the URI path, and ends with the HTTP version.)

LastStringResult As String (read-only)

Introduced in version 9.5.0.52

The string return value of the last (string returning) method called. Only available if Chilkat.Global.KeepStringResult is set to 1. This provides a means for obtaining large string results in the SQL Server environment (where limitations exist in getting long strings returned by method calls, but where temp tables can be used for string properties).

Long Strings Returned by ActiveX Methods in SQL Server

LastStringResultLen As Long (read-only)

Introduced in version 9.5.0.53

The length, in characters, of the string contained in the LastStringResult property.

NumResponseHeaders As Long (read-only)

Introduced in version 9.5.0.58

The number of response header fields. The first response header field is at index 0.

PartSelector As String

Introduced in version 9.5.0.58

Only used for multipart requests. Selects the target MIME part for calls to AddHeader, RemoveHeader, SetMultipartBodyBinary, SetMultipartBodyString, SetMultipartBodyStream, etc. The default is an empty string and indicates the top-level header. A string value of "1" would indicate the 1st sub-part in a multipart request. A string value of "1.2" would indicate the 2nd sub-part under the 1st sub-part.

It is unlikely you'll ever encounter the need for nested multipart requests (i.e. part selectors such as "1.2") Also, most REST requests are NOT multipart, and therefore this feature is rarely used. An example of a multipart REST request would be for a Google Drive upload, where the top-level Content-Type is multipart/related, the1st sub-part contains the JSON meta-data, and the 2nd sub-part contains the file data.

(Classic ASP) Google Drive Multipart Upload String (Google Drive)

(Visual FoxPro) Google Drive Multipart Upload String (Google Drive)

(PowerBuilder) Google Drive Multipart Upload String (Google Drive)

(SQL Server) Google Drive Multipart Upload String (Google Drive)

(Visual Basic 6.0) Google Drive Multipart Upload String (Google Drive)

(VBScript) Google Drive Multipart Upload String (Google Drive)

PercentDoneOnSend As Long

Introduced in version 9.5.0.58

This property only applies to the FullRequest* methods, which are methods that both send an HTTP request and receive the response. (It also only applies to programming languages that support event callbacks.) It determines whether percentage completion is tracked for the sending of the HTTP request, or for the downloading the HTTP response. The default value is 0, which is to measure the percent completion when receiving the response.

For example: If the REST request is to download a file, then this property should remain at the default value of 0. If the REST request is to upload a file (using a Full* method), then set this property to 1. Also note if a server sends an HTTP response in the chunked encoding, it is not possible to measure percent completion because the HTTP client has no way of knowing the total size of the HTTP response.

ResponseHeader As String (read-only)

Introduced in version 9.5.0.58

The full response MIME header (not including the HTTP start line which contains the status code and status text).

ResponseStatusCode As Long (read-only)

Introduced in version 9.5.0.58

The response status code.

ResponseStatusText As String (read-only)

Introduced in version 9.5.0.58

The status message corresponding to the response status code.

StreamNonChunked As Long

Introduced in version 9.5.0.58

If 1, then methods that upload data are sent non-chunked if possible. For example, if the FullRequestStream method is called where the stream is a file stream, then the size of the content is known and the HTTP request will be sent using a Content-Length header instead of using a Transfer-Encoding: chunked upload. If 0, then the chunked transfer encoding is used. The default value of this property is 1.

VerboseLogging As Long

If set to 1, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. The default value is 0. Verbose logging should only be used for debugging. The potentially large quantity of logged information may adversely affect peformance.

Version As String (read-only)

Version of the component/library, such as "9.5.0.63"

Methods

AddHeader(name As String, value As String) As Long

Introduced in version 9.5.0.58

Adds an HTTP request header. If the header field already exists, then it is replaced.

Returns 1 for success, 0 for failure.

AddMwsSignature(httpVerb As String, uriPath As String, domain As String, mwsSecretKey As String) As Long

Introduced in version 9.5.0.66

Computes the Amazon MWS signature using the mwsSecretKey and adds the "Signature" parameter to the request. This method should be called for all Amazon Marketplace Web Service (Amazon MWS) HTTP requests. It should be called after all request parameters have been added.

The domain should be the domain of the request, such as one of the following:

  • mws.amazonservices.com
  • mws-eu.amazonservices.com
  • mws.amazonservices.in
  • mws.amazonservices.com.cn
  • mws.amazonservices.jp

The httpVerb should be the HTTP verb, such as "GET", "POST", etc. The uriPath is the URI path, such as "/Feeds/2009-01-01". In general, the httpVerb and uriPath should be identical to the 1st two args passed to methods such as FullRequestFormUrlEncoded.

Note: This method also automatically adds or replaces the existing Timestamp parameter to the current system date/time.

Returns 1 for success, 0 for failure.

(Classic ASP) MWS List Orders (Amazon Marketplace Web Service)

(Visual FoxPro) MWS List Orders (Amazon Marketplace Web Service)

(PowerBuilder) MWS List Orders (Amazon Marketplace Web Service)

(SQL Server) MWS List Orders (Amazon Marketplace Web Service)

(Visual Basic 6.0) MWS List Orders (Amazon Marketplace Web Service)

(VBScript) MWS List Orders (Amazon Marketplace Web Service)

AddPathParam(name As String, value As String) As Long

Introduced in version 9.5.0.70

Adds or replaces a path parameter. A path parameter is a string that will be replaced in any uriPath string passed to a method. For example, if name is "fileId" and value is "1R_70heIyzIAu1_u0prXbYcaIiJRVkgBl", then a uriPath argument of "/drive/v3/files/fileId" will be transformed to "/drive/v3/files/1R_70heIyzIAu1_u0prXbYcaIiJRVkgBl" in a method call.

Returns 1 for success, 0 for failure.

AddQueryParam(name As String, value As String) As Long

Introduced in version 9.5.0.58

Adds a query parameter. If the query parameter already exists, then it is replaced.

Returns 1 for success, 0 for failure.

AddQueryParams(queryString As String) As Long

Introduced in version 9.5.0.58

Adds the query parameters from the queryString. The queryString is a query string of the format field1=value1&field2=value2&field3=value3... where each value is URL encoded.

Returns 1 for success, 0 for failure.

AddQueryParamSb(name As String, value As ChilkatStringBuilder) As Long

Introduced in version 9.5.0.62

Adds a query parameter. If the query parameter already exists, then it is replaced. The parameter value is passed in a StringBuilder object.

Returns 1 for success, 0 for failure.

ClearAllHeaders() As Long

Introduced in version 9.5.0.58

Removes all HTTP request headers.

Returns 1 for success, 0 for failure.

ClearAllParts() As Long

Introduced in version 9.5.0.64

Removes all sub-parts from a request. This is useful when preparing the REST object to send a new request after a multipart request has just been sent.

Returns 1 for success, 0 for failure.

(Classic ASP) REST Send multipart/form-data

(Visual FoxPro) REST Send multipart/form-data

(PowerBuilder) REST Send multipart/form-data

(SQL Server) REST Send multipart/form-data

(Visual Basic 6.0) REST Send multipart/form-data

(VBScript) REST Send multipart/form-data

ClearAllPathParams() As Long

Introduced in version 9.5.0.70

Clears all path parameters.

Returns 1 for success, 0 for failure.

ClearAllQueryParams() As Long

Introduced in version 9.5.0.58

Clears all query parameters.

Returns 1 for success, 0 for failure.

ClearAuth() As Long

Introduced in version 9.5.0.69

Clears all authentication settings.

Returns 1 for success, 0 for failure.

ClearResponseBodyStream()

Introduced in version 9.5.0.58

Clears the response body stream set by calling SetResponseBodyStream.

Connect(hostname As String, ByVal port As Long, ByVal tls As Long, ByVal autoReconnect As Long) As Long

Introduced in version 9.5.0.58

Establishes an initial connection to a REST server. The hostname can be a domain name or an IP address. Both IPv4 and IPv6 addresses are supported. The port is the port, which is typically 80 or 443. If SSL/TLS is required, then tls should be set to 1. The autoReconnect indicates whether connection should automatically be established as needed for subsequent REST requests.

Note: This method is for simple connections that do not require any proxies (HTTP or SOCKS), or SSH tunneling. If a proxy, SSH tunnel, or any other advanced socket feature is required, the Chilkat Socket API can be used to establish the connection. The UseConnection method can then be called to use the pre-established socket connection.

Returns 1 for success, 0 for failure.

(Classic ASP) Simple REST Example

(Visual FoxPro) Simple REST Example

(PowerBuilder) Simple REST Example

(SQL Server) Simple REST Example

(Visual Basic 6.0) Simple REST Example

(VBScript) Simple REST Example

(Classic ASP) REST Auto Reconnect for Multiple Requests

(Visual FoxPro) REST Auto Reconnect for Multiple Requests

(PowerBuilder) REST Auto Reconnect for Multiple Requests

(SQL Server) REST Auto Reconnect for Multiple Requests

(Visual Basic 6.0) REST Auto Reconnect for Multiple Requests

(VBScript) REST Auto Reconnect for Multiple Requests

ConnectAsync(hostname As String, ByVal port As Long, ByVal tls As Long, ByVal autoReconnect As Long) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the Connect method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

Disconnect(ByVal maxWaitMs As Long) As Long

Introduced in version 9.5.0.58

Closes the connection with the HTTP server if one is open. This method can be called to ensure the connection is closed. The maxWaitMs is the maximum time in milliseconds to wait for a clean close. If the connection is through an SSH tunnel, this closes the logical channel within the SSH tunnel, and not the connection with the SSH server itself.

Returns 1 for success, 0 for failure.

DisconnectAsync(ByVal maxWaitMs As Long) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the Disconnect method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

FullRequestBd(httpVerb As String, uriPath As String, binData As ChilkatBinData, responseBody As ChilkatStringBuilder) As Long

Introduced in version 9.5.0.64

Sends a complete REST request (header + binary body) and receives the full response. The binary body of the request is passed in binData. The response body is returned in responseBody (replacing whatever contents responseBody may have previously held).

Returns 1 for success, 0 for failure.

(Classic ASP) S3 Upload Binary File from BinData

(Visual FoxPro) S3 Upload Binary File from BinData

(PowerBuilder) S3 Upload Binary File from BinData

(SQL Server) S3 Upload Binary File from BinData

(Visual Basic 6.0) S3 Upload Binary File from BinData

(VBScript) S3 Upload Binary File from BinData

FullRequestBdAsync(httpVerb As String, uriPath As String, binData As ChilkatBinData, responseBody As ChilkatStringBuilder) As ChilkatTask

Introduced in version 9.5.0.64

Creates an asynchronous task to call the FullRequestBd method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

FullRequestBinary(httpVerb As String, uriPath As String, bodyBytes As Variant) As String

Introduced in version 9.5.0.58

Sends a complete REST request (header + body) and receives the full response. It is assumed that the request body is binary, and the response body is a string (such as JSON or XML). The response body is returned.

This method is the equivalent of making the following calls in sequence: SendReqBinaryBody, ReadResponseHeader, ReadRespBodyString.

Returns Nothing on failure

(Classic ASP) Put Blob: Upload Binary Data to Block Blob

(Visual FoxPro) Put Blob: Upload Binary Data to Block Blob

(PowerBuilder) Put Blob: Upload Binary Data to Block Blob

(SQL Server) Put Blob: Upload Binary Data to Block Blob

(Visual Basic 6.0) Put Blob: Upload Binary Data to Block Blob

(VBScript) Put Blob: Upload Binary Data to Block Blob

FullRequestBinaryAsync(httpVerb As String, uriPath As String, bodyBytes As Variant) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the FullRequestBinary method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

FullRequestFormUrlEncoded(httpVerb As String, uriPath As String) As String

Introduced in version 9.5.0.58

Sends a complete application/x-www-form-urlencoded HTTP request and receives the full response. The request body is composed of the URL encoded query params. It is assumed that the response body is a string (such as JSON or XML). The response body is returned.

This method is the equivalent of making the following calls in sequence: SendReqFormUrlEncoded, ReadResponseHeader, ReadRespBodyString.

Returns Nothing on failure

(Classic ASP) Twilio: Send SMS using Basic Authentication

(Visual FoxPro) Twilio: Send SMS using Basic Authentication

(PowerBuilder) Twilio: Send SMS using Basic Authentication

(SQL Server) Twilio: Send SMS using Basic Authentication

(Visual Basic 6.0) Twilio: Send SMS using Basic Authentication

(VBScript) Twilio: Send SMS using Basic Authentication

FullRequestFormUrlEncodedAsync(httpVerb As String, uriPath As String) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the FullRequestFormUrlEncoded method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

FullRequestMultipart(httpVerb As String, uriPath As String) As String

Introduced in version 9.5.0.58

Sends a complete multipart REST request (header + multipart body) and receives the full response. It is assumed that the response body is a string (such as JSON or XML). The response body is returned.

This method is the equivalent of making the following calls in sequence: SendReqMultipart, ReadResponseHeader, ReadRespBodyString.

Returns Nothing on failure

(Classic ASP) Google Drive Multipart Upload String (Google Drive)

(Visual FoxPro) Google Drive Multipart Upload String (Google Drive)

(PowerBuilder) Google Drive Multipart Upload String (Google Drive)

(SQL Server) Google Drive Multipart Upload String (Google Drive)

(Visual Basic 6.0) Google Drive Multipart Upload String (Google Drive)

(VBScript) Google Drive Multipart Upload String (Google Drive)

FullRequestMultipartAsync(httpVerb As String, uriPath As String) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the FullRequestMultipart method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

FullRequestNoBody(httpVerb As String, uriPath As String) As String

Introduced in version 9.5.0.58

Sends a complete REST request and receives the full response. It is assumed that the response body is a string (such as JSON or XML). The response body is returned.

This method is the equivalent of making the following calls in sequence: SendReqNoBody, ReadResponseHeader, ReadRespBodyString.

Returns Nothing on failure

(Classic ASP) Simple REST Example

(Visual FoxPro) Simple REST Example

(PowerBuilder) Simple REST Example

(SQL Server) Simple REST Example

(Visual Basic 6.0) Simple REST Example

(VBScript) Simple REST Example

(Classic ASP) Geolocation of IP Address

(Visual FoxPro) Geolocation of IP Address

(PowerBuilder) Geolocation of IP Address

(SQL Server) Geolocation of IP Address

(Visual Basic 6.0) Geolocation of IP Address

(VBScript) Geolocation of IP Address

FullRequestNoBodyAsync(httpVerb As String, uriPath As String) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the FullRequestNoBody method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

FullRequestNoBodyBd(httpVerb As String, uriPath As String, binData As ChilkatBinData) As Long

Introduced in version 9.5.0.64

The same as FullRequestNoBody, except returns the response body in the binData. This method is useful for downloading binary files.

Returns 1 for success, 0 for failure.

(Classic ASP) Xero Get File Content (Files API)

(Visual FoxPro) Xero Get File Content (Files API)

(PowerBuilder) Xero Get File Content (Files API)

(SQL Server) Xero Get File Content (Files API)

(Visual Basic 6.0) Xero Get File Content (Files API)

(VBScript) Xero Get File Content (Files API)

FullRequestNoBodyBdAsync(httpVerb As String, uriPath As String, binData As ChilkatBinData) As ChilkatTask

Introduced in version 9.5.0.64

Creates an asynchronous task to call the FullRequestNoBodyBd method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

FullRequestNoBodySb(httpVerb As String, uriPath As String, sb As ChilkatStringBuilder) As Long

Introduced in version 9.5.0.64

The same as FullRequestNoBody, except returns the response body in the sb.

Returns 1 for success, 0 for failure.

(Classic ASP) Xero Get Accounts using REST API

(Visual FoxPro) Xero Get Accounts using REST API

(PowerBuilder) Xero Get Accounts using REST API

(SQL Server) Xero Get Accounts using REST API

(Visual Basic 6.0) Xero Get Accounts using REST API

(VBScript) Xero Get Accounts using REST API

FullRequestNoBodySbAsync(httpVerb As String, uriPath As String, sb As ChilkatStringBuilder) As ChilkatTask

Introduced in version 9.5.0.64

Creates an asynchronous task to call the FullRequestNoBodySb method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

FullRequestSb(httpVerb As String, uriPath As String, requestBody As ChilkatStringBuilder, responseBody As ChilkatStringBuilder) As Long

Introduced in version 9.5.0.62

Sends a complete REST request (header + body string) and receives the full response. The body of the request is passed in requestBody. The response body is returned in responseBody (replacing whatever contents responseBody may have previously held).

Returns 1 for success, 0 for failure.

FullRequestSbAsync(httpVerb As String, uriPath As String, requestBody As ChilkatStringBuilder, responseBody As ChilkatStringBuilder) As ChilkatTask

Introduced in version 9.5.0.62

Creates an asynchronous task to call the FullRequestSb method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

FullRequestStream(httpVerb As String, uriPath As String, stream As ChilkatStream) As String

Introduced in version 9.5.0.58

Sends a complete REST request and receives the full response. It is assumed that the response body is a string (such as JSON or XML). The response body is returned.

This method is the equivalent of making the following calls in sequence: SendReqStream, ReadResponseHeader, ReadRespBodyString.

Returns Nothing on failure

(Classic ASP) REST File Streaming Upload

(Visual FoxPro) REST File Streaming Upload

(PowerBuilder) REST File Streaming Upload

(SQL Server) REST File Streaming Upload

(Visual Basic 6.0) REST File Streaming Upload

(VBScript) REST File Streaming Upload

(Classic ASP) AWS S3 File Streaming Upload

(Visual FoxPro) AWS S3 File Streaming Upload

(PowerBuilder) AWS S3 File Streaming Upload

(SQL Server) AWS S3 File Streaming Upload

(Visual Basic 6.0) AWS S3 File Streaming Upload

(VBScript) AWS S3 File Streaming Upload

(Classic ASP) REST Asynchronous Streaming Upload Simplified

(Visual FoxPro) REST Asynchronous Streaming Upload Simplified

(PowerBuilder) REST Asynchronous Streaming Upload Simplified

(SQL Server) REST Asynchronous Streaming Upload Simplified

(Visual Basic 6.0) REST Asynchronous Streaming Upload Simplified

(VBScript) REST Asynchronous Streaming Upload Simplified

FullRequestStreamAsync(httpVerb As String, uriPath As String, stream As ChilkatStream) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the FullRequestStream method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

FullRequestString(httpVerb As String, uriPath As String, bodyText As String) As String

Introduced in version 9.5.0.58

Sends a complete REST request (header + body string) and receives the full response. It is assumed that both the request and response bodies are strings (such as JSON or XML). The response body is returned.

This method is the equivalent of making the following calls in sequence: SendReqStringBody, ReadResponseHeader, ReadRespBodyString.

Returns Nothing on failure

(Classic ASP) Send JSON REST Request, Get JSON Response

(Visual FoxPro) Send JSON REST Request, Get JSON Response

(PowerBuilder) Send JSON REST Request, Get JSON Response

(SQL Server) Send JSON REST Request, Get JSON Response

(Visual Basic 6.0) Send JSON REST Request, Get JSON Response

(VBScript) Send JSON REST Request, Get JSON Response

(Classic ASP) REST Upload String

(Visual FoxPro) REST Upload String

(PowerBuilder) REST Upload String

(SQL Server) REST Upload String

(Visual Basic 6.0) REST Upload String

(VBScript) REST Upload String

FullRequestStringAsync(httpVerb As String, uriPath As String, bodyText As String) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the FullRequestString method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

ReadRespBd(responseBody As ChilkatBinData) As Long

Introduced in version 9.5.0.62

Reads the response body. Should only be called after ReadResponseHeader has been called, and should only be called when it is already known that the response body is binary, such as for JPG images or other non-text binary file types. The response body is received into responseBody (replacing whatever contents responseBody may have previously held).

Returns 1 for success, 0 for failure.

ReadRespBdAsync(responseBody As ChilkatBinData) As ChilkatTask

Introduced in version 9.5.0.62

Creates an asynchronous task to call the ReadRespBd method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

ReadRespBodyBinary() As Variant

Introduced in version 9.5.0.58

Reads the response body. Should only be called after ReadResponseHeader has been called, and should only be called when it is already known that the response body is binary, such as for JPG images or other non-text binary file types.

Returns a zero-length byte array (as a Variant) on failure.
An empty array will have a UBound of -1 meaning 0 elements.

(Classic ASP) REST Download Binary to Memory (Byte Array)

(Visual FoxPro) REST Download Binary to Memory (Byte Array)

(PowerBuilder) REST Download Binary to Memory (Byte Array)

(SQL Server) REST Download Binary to Memory (Byte Array)

(Visual Basic 6.0) REST Download Binary to Memory (Byte Array)

(VBScript) REST Download Binary to Memory (Byte Array)

ReadRespBodyBinaryAsync() As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the ReadRespBodyBinary method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

ReadRespBodyStream(stream As ChilkatStream, ByVal autoSetStreamCharset As Long) As Long

Introduced in version 9.5.0.58

Reads the response body to the stream. If autoSetStreamCharset is 1, then the stream's StringCharset property will automatically get set based on the charset, if any, indicated in the response header. If the response is binary, then autoSetStreamCharset is ignored.

Returns 1 for success, 0 for failure.

(Classic ASP) REST Stream Response to File (Streaming Download)

(Visual FoxPro) REST Stream Response to File (Streaming Download)

(PowerBuilder) REST Stream Response to File (Streaming Download)

(SQL Server) REST Stream Response to File (Streaming Download)

(Visual Basic 6.0) REST Stream Response to File (Streaming Download)

(VBScript) REST Stream Response to File (Streaming Download)

(Classic ASP) REST Read Response with Stream API

(Visual FoxPro) REST Read Response with Stream API

(PowerBuilder) REST Read Response with Stream API

(SQL Server) REST Read Response with Stream API

(Visual Basic 6.0) REST Read Response with Stream API

(VBScript) REST Read Response with Stream API

(Classic ASP) Firebase Receive Server-Sent Events (text/event-stream)

(Visual FoxPro) Firebase Receive Server-Sent Events (text/event-stream)

(PowerBuilder) Firebase Receive Server-Sent Events (text/event-stream)

(SQL Server) Firebase Receive Server-Sent Events (text/event-stream)

(Visual Basic 6.0) Firebase Receive Server-Sent Events (text/event-stream)

(VBScript) Firebase Receive Server-Sent Events (text/event-stream)

(Classic ASP) HTTP POST and Stream Response to File

(Visual FoxPro) HTTP POST and Stream Response to File

(PowerBuilder) HTTP POST and Stream Response to File

(SQL Server) HTTP POST and Stream Response to File

(Visual Basic 6.0) HTTP POST and Stream Response to File

(VBScript) HTTP POST and Stream Response to File

ReadRespBodyStreamAsync(stream As ChilkatStream, ByVal autoSetStreamCharset As Long) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the ReadRespBodyStream method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

ReadRespBodyString() As String

Introduced in version 9.5.0.58

Reads the response body. Should only be called after ReadResponseHeader has been called, and should only be called when it is already known that the response body will be a string (such as XML, JSON, etc.)

Returns Nothing on failure

(Classic ASP) Lower-Level REST API Methods

(Visual FoxPro) Lower-Level REST API Methods

(PowerBuilder) Lower-Level REST API Methods

(SQL Server) Lower-Level REST API Methods

(Visual Basic 6.0) Lower-Level REST API Methods

(VBScript) Lower-Level REST API Methods

ReadRespBodyStringAsync() As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the ReadRespBodyString method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

ReadResponseHeader() As Long

Introduced in version 9.5.0.58

Reads the HTTP response header. If the HTTP response includes a body, then the application must call the desired method to read the response body. Otherwise, the HTTP request / response is finished after reading the response header (such as for a GET request). The contents of the response header are available in various properties and methods.

The HTTP response status code is returned (such as 200 for a typical success response). If an error occurred such that no response was received, then a value of -1 is returned.

(Classic ASP) Lower-Level REST API Methods

(Visual FoxPro) Lower-Level REST API Methods

(PowerBuilder) Lower-Level REST API Methods

(SQL Server) Lower-Level REST API Methods

(Visual Basic 6.0) Lower-Level REST API Methods

(VBScript) Lower-Level REST API Methods

ReadResponseHeaderAsync() As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the ReadResponseHeader method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

ReadRespSb(responseBody As ChilkatStringBuilder) As Long

Introduced in version 9.5.0.62

Reads the response body. Should only be called after ReadResponseHeader has been called, and should only be called when it is already known that the response body will be a string (such as XML, JSON, etc.) The response body is stored in responseBody. (replacing whatever contents responseBody may have previously held).

Returns 1 for success, 0 for failure.

ReadRespSbAsync(responseBody As ChilkatStringBuilder) As ChilkatTask

Introduced in version 9.5.0.62

Creates an asynchronous task to call the ReadRespSb method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

RedirectUrl() As ChilkatUrl

Introduced in version 9.5.0.58

If the response was a redirect and contains a Location header field, this method returns the redirect URL.

Returns Nothing on failure

RemoveHeader(name As String) As Long

Introduced in version 9.5.0.58

Removes all headers having the given name.

Returns 1 for success, 0 for failure.

RemoveQueryParam(name As String) As Long

Introduced in version 9.5.0.58

Removes all query params having the given name.

Returns 1 for success, 0 for failure.

ResponseHdrByName(name As String) As String

Introduced in version 9.5.0.58

Returns the value of the response header indicated by name.

Returns Nothing on failure

(Classic ASP) Azure Storage: Create Container

(Visual FoxPro) Azure Storage: Create Container

(PowerBuilder) Azure Storage: Create Container

(SQL Server) Azure Storage: Create Container

(Visual Basic 6.0) Azure Storage: Create Container

(VBScript) Azure Storage: Create Container

(Classic ASP) Download File from Dropbox into a String Variable

(Visual FoxPro) Download File from Dropbox into a String Variable

(PowerBuilder) Download File from Dropbox into a String Variable

(SQL Server) Download File from Dropbox into a String Variable

(Visual Basic 6.0) Download File from Dropbox into a String Variable

(VBScript) Download File from Dropbox into a String Variable

(Classic ASP) Fetch S3 Object Metadata

(Visual FoxPro) Fetch S3 Object Metadata

(PowerBuilder) Fetch S3 Object Metadata

(SQL Server) Fetch S3 Object Metadata

(Visual Basic 6.0) Fetch S3 Object Metadata

(VBScript) Fetch S3 Object Metadata

ResponseHdrName(ByVal index As Long) As String

Introduced in version 9.5.0.58

Returns the name of the Nth response header field. (Chilkat always uses 0-based indexing. The first header field is at index 0.)

Returns Nothing on failure

(Classic ASP) Fetch S3 Object Metadata

(Visual FoxPro) Fetch S3 Object Metadata

(PowerBuilder) Fetch S3 Object Metadata

(SQL Server) Fetch S3 Object Metadata

(Visual Basic 6.0) Fetch S3 Object Metadata

(VBScript) Fetch S3 Object Metadata

ResponseHdrValue(ByVal index As Long) As String

Introduced in version 9.5.0.58

Returns the value of the Nth response header field. (Chilkat always uses 0-based indexing. The first header field is at index 0.)

Returns Nothing on failure

(Classic ASP) Fetch S3 Object Metadata

(Visual FoxPro) Fetch S3 Object Metadata

(PowerBuilder) Fetch S3 Object Metadata

(SQL Server) Fetch S3 Object Metadata

(Visual Basic 6.0) Fetch S3 Object Metadata

(VBScript) Fetch S3 Object Metadata

SendReqBd(httpVerb As String, uriPath As String, body As ChilkatBinData) As Long

Introduced in version 9.5.0.62

Sends a REST request that cotnains a binary body. The httpVerb is the HTTP verb (also known as the HTTP method), such as "PUT". The uriPath is the path of the resource URI. The body contains the bytes of the HTTP request body.

Returns 1 for success, 0 for failure.

SendReqBdAsync(httpVerb As String, uriPath As String, body As ChilkatBinData) As ChilkatTask

Introduced in version 9.5.0.62

Creates an asynchronous task to call the SendReqBd method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

SendReqBinaryBody(httpVerb As String, uriPath As String, body As Variant) As Long

Introduced in version 9.5.0.58

Sends a REST request that cotnains a binary body. The httpVerb is the HTTP verb (also known as the HTTP method), such as "PUT". The uriPath is the path of the resource URI. The body contains the bytes of the HTTP request body.

Returns 1 for success, 0 for failure.

SendReqBinaryBodyAsync(httpVerb As String, uriPath As String, body As Variant) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the SendReqBinaryBody method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

SendReqFormUrlEncoded(httpVerb As String, uriPath As String) As Long

Introduced in version 9.5.0.58

Sends an application/x-www-form-urlencoded HTTP request where the body is composed of the URL encoded query params. The httpVerb is the HTTP verb (also known as the HTTP method), such as "POST". The uriPath is the path of the resource URI. If the Content-Type header was set, it is ignored and instead the Content-Type of the request will be "application/x-www-form-urlencoded".

Returns 1 for success, 0 for failure.

SendReqFormUrlEncodedAsync(httpVerb As String, uriPath As String) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the SendReqFormUrlEncoded method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

SendReqMultipart(httpVerb As String, uriPath As String) As Long

Introduced in version 9.5.0.58

Sends a multipart REST request. The httpVerb is the HTTP verb (also known as the HTTP method), such as "GET". The uriPath is the path of the resource URI.

Returns 1 for success, 0 for failure.

SendReqMultipartAsync(httpVerb As String, uriPath As String) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the SendReqMultipart method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

SendReqNoBody(httpVerb As String, uriPath As String) As Long

Introduced in version 9.5.0.58

Sends a REST request that cotnains no body. The httpVerb is the HTTP verb (also known as the HTTP method), such as "GET". The uriPath is the path of the resource URI.

Returns 1 for success, 0 for failure.

SendReqNoBodyAsync(httpVerb As String, uriPath As String) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the SendReqNoBody method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

SendReqSb(httpVerb As String, uriPath As String, bodySb As ChilkatStringBuilder) As Long

Introduced in version 9.5.0.62

Sends a REST request that cotnains a text body, such as XML or JSON. The httpVerb is the HTTP verb (also known as the HTTP method), such as "PUT". The uriPath is the path of the resource URI. The bodySb contains the text of the HTTP request body.

Returns 1 for success, 0 for failure.

SendReqSbAsync(httpVerb As String, uriPath As String, bodySb As ChilkatStringBuilder) As ChilkatTask

Introduced in version 9.5.0.62

Creates an asynchronous task to call the SendReqSb method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

SendReqStreamBody(httpVerb As String, uriPath As String, stream As ChilkatStream) As Long

Introduced in version 9.5.0.58

Sends a REST request that cotnains a binary or text body that is obtained by reading from the stream. The httpVerb is the HTTP verb (also known as the HTTP method), such as "PUT". The uriPath is the path of the resource URI.

Returns 1 for success, 0 for failure.

(Classic ASP) REST Asynchronous Streaming Upload

(Visual FoxPro) REST Asynchronous Streaming Upload

(PowerBuilder) REST Asynchronous Streaming Upload

(SQL Server) REST Asynchronous Streaming Upload

(Visual Basic 6.0) REST Asynchronous Streaming Upload

(VBScript) REST Asynchronous Streaming Upload

SendReqStreamBodyAsync(httpVerb As String, uriPath As String, stream As ChilkatStream) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the SendReqStreamBody method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

SendReqStringBody(httpVerb As String, uriPath As String, bodyText As String) As Long

Introduced in version 9.5.0.58

Sends a REST request that cotnains a text body, such as XML or JSON. The httpVerb is the HTTP verb (also known as the HTTP method), such as "PUT". The uriPath is the path of the resource URI. The bodyText contains the text of the HTTP request body.

Returns 1 for success, 0 for failure.

(Classic ASP) Lower-Level REST API Methods

(Visual FoxPro) Lower-Level REST API Methods

(PowerBuilder) Lower-Level REST API Methods

(SQL Server) Lower-Level REST API Methods

(Visual Basic 6.0) Lower-Level REST API Methods

(VBScript) Lower-Level REST API Methods

SendReqStringBodyAsync(httpVerb As String, uriPath As String, bodyText As String) As ChilkatTask

Introduced in version 9.5.0.58

Creates an asynchronous task to call the SendReqStringBody method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

VB6 Programs MUST Call FinalizeThreadPool Just Before Exiting

Asynchronous Methods in VB6 - Be Very Careful with Callbacks

(Classic ASP) How to Run an Asynchronous Task

(Visual FoxPro) How to Run an Asynchronous Task

(PowerBuilder) How to Run an Asynchronous Task

(SQL Server) How to Run an Asynchronous Task

(Visual Basic 6.0) How to Run an Asynchronous Task

(VBScript) How to Run an Asynchronous Task

SetAuthAws(authProvider As ChilkatAuthAws) As Long

Introduced in version 9.5.0.58

Sets the authorization service provider for Amazon AWS REST requests. An application that sets an AWS authentication provider need not explicitly set the Authorization property. Each REST request is automatically signed and authenticated using the authProvider.

Returns 1 for success, 0 for failure.

(Classic ASP) REST through HTTP Proxy

(Visual FoxPro) REST through HTTP Proxy

(PowerBuilder) REST through HTTP Proxy

(SQL Server) REST through HTTP Proxy

(Visual Basic 6.0) REST through HTTP Proxy

(VBScript) REST through HTTP Proxy

SetAuthAzureAD(authProvider As ChilkatAuthAzureAD) As Long

Introduced in version 9.5.0.58

Sets the Azure AD (Active Directory) authorization service provider.

Returns 1 for success, 0 for failure.

SetAuthAzureSas(authProvider As ChilkatAuthAzureSAS) As Long

Introduced in version 9.5.0.65

Provides the information for Azure SAS (Shared Access Signature) authorization. Calling this method will cause the "Authorization: SharedAccessSignature ..." header to be automatically added to all requests.

Returns 1 for success, 0 for failure.

(Classic ASP) Azure Service Bus - Create Queue

(Visual FoxPro) Azure Service Bus - Create Queue

(PowerBuilder) Azure Service Bus - Create Queue

(SQL Server) Azure Service Bus - Create Queue

(Visual Basic 6.0) Azure Service Bus - Create Queue

(VBScript) Azure Service Bus - Create Queue

SetAuthAzureStorage(authProvider As ChilkatAuthAzureStorage) As Long

Introduced in version 9.5.0.58

Sets the authorization service provider for Azure Storage Service requests.

Returns 1 for success, 0 for failure.

(Classic ASP) Azure Storage Blob Simple Upload

(Visual FoxPro) Azure Storage Blob Simple Upload

(PowerBuilder) Azure Storage Blob Simple Upload

(SQL Server) Azure Storage Blob Simple Upload

(Visual Basic 6.0) Azure Storage Blob Simple Upload

(VBScript) Azure Storage Blob Simple Upload

(Classic ASP) Azure Blob Service - List all Containers in a Storage Account

(Visual FoxPro) Azure Blob Service - List all Containers in a Storage Account

(PowerBuilder) Azure Blob Service - List all Containers in a Storage Account

(SQL Server) Azure Blob Service - List all Containers in a Storage Account

(Visual Basic 6.0) Azure Blob Service - List all Containers in a Storage Account

(VBScript) Azure Blob Service - List all Containers in a Storage Account

SetAuthBasic(username As String, password As String) As Long

Introduced in version 9.5.0.58

Sets the username and password to be used for Basic authentication. This method should be called when Basic authentication is required. It should only be used with secure SSL/TLS connections. Calling this method will cause the "Authorization: Basic ..." header to be automatically added to all requests. In many cases, a REST API will support Basic authentication where the username is a client ID or account ID, and the password is a client secret or token.

Returns 1 for success, 0 for failure.

(Classic ASP) Twilio: Send SMS using Basic Authentication

(Visual FoxPro) Twilio: Send SMS using Basic Authentication

(PowerBuilder) Twilio: Send SMS using Basic Authentication

(SQL Server) Twilio: Send SMS using Basic Authentication

(Visual Basic 6.0) Twilio: Send SMS using Basic Authentication

(VBScript) Twilio: Send SMS using Basic Authentication

SetAuthBasicSecure(username As ChilkatSecureString, password As ChilkatSecureString) As Long

Introduced in version 9.5.0.71

The same as SetAuthBasic, but provides a more secure means for passing the arguments as secure string objects.

Returns 1 for success, 0 for failure.

(Classic ASP) REST Basic Auth with Secure Strings

(Visual FoxPro) REST Basic Auth with Secure Strings

(PowerBuilder) REST Basic Auth with Secure Strings

(SQL Server) REST Basic Auth with Secure Strings

(Visual Basic 6.0) REST Basic Auth with Secure Strings

(VBScript) REST Basic Auth with Secure Strings

SetAuthGoogle(authProvider As ChilkatAuthGoogle) As Long

Introduced in version 9.5.0.58

Sets the authorization service provider for Google API requests.

Returns 1 for success, 0 for failure.

SetAuthOAuth1(authProvider As ChilkatOAuth1, ByVal useQueryParams As Long) As Long

Introduced in version 9.5.0.58

Sets the authentication provider for REST API requests needing OAuth 1.0 (and OAuth 1.0a) authentication. If useQueryParams is 1, then the OAuth1 authentication information and signature is passed in query parameters. Otherwise it is passed in an Authorization header.

Returns 1 for success, 0 for failure.

(Classic ASP) WooCommerce OAuth 1.0a “one-legged” Authentication

(Visual FoxPro) WooCommerce OAuth 1.0a “one-legged” Authentication

(PowerBuilder) WooCommerce OAuth 1.0a “one-legged” Authentication

(SQL Server) WooCommerce OAuth 1.0a “one-legged” Authentication

(Visual Basic 6.0) WooCommerce OAuth 1.0a “one-legged” Authentication

(VBScript) WooCommerce OAuth 1.0a “one-legged” Authentication

SetAuthOAuth2(authProvider As ChilkatOAuth2) As Long

Introduced in version 9.5.0.59

Sets the authentication provider for REST API requests needing standards-based OAuth 2.0 authentication. This is for the case where a desktop/native/mobile application will be popping up a web browser, or embedding a web browser, to get authorization interactively from end-user of the application.

Returns 1 for success, 0 for failure.

SetMultipartBodyBd(bodyData As ChilkatBinData) As Long

Introduced in version 9.5.0.62

Only used for multipart requests. Sets the binary content of the multipart body indicated by the PartSelector.

Returns 1 for success, 0 for failure.

(Classic ASP) REST Send multipart/form-data

(Visual FoxPro) REST Send multipart/form-data

(PowerBuilder) REST Send multipart/form-data

(SQL Server) REST Send multipart/form-data

(Visual Basic 6.0) REST Send multipart/form-data

(VBScript) REST Send multipart/form-data

SetMultipartBodyBinary(bodyData As Variant) As Long

Introduced in version 9.5.0.58

Only used for multipart requests. Sets the binary content of the multipart body indicated by the PartSelector.

Returns 1 for success, 0 for failure.

SetMultipartBodySb(bodySb As ChilkatStringBuilder) As Long

Introduced in version 9.5.0.62

Only used for multipart requests. Sets the text content of the multipart body indicated by the PartSelector.

Returns 1 for success, 0 for failure.

(Classic ASP) REST Send multipart/form-data

(Visual FoxPro) REST Send multipart/form-data

(PowerBuilder) REST Send multipart/form-data

(SQL Server) REST Send multipart/form-data

(Visual Basic 6.0) REST Send multipart/form-data

(VBScript) REST Send multipart/form-data

SetMultipartBodyStream(stream As ChilkatStream) As Long

Introduced in version 9.5.0.58

Only used for multipart requests. Sets the stream source of the multipart body indicated by the PartSelector.

Returns 1 for success, 0 for failure.

SetMultipartBodyString(bodyText As String) As Long

Introduced in version 9.5.0.58

Only used for multipart requests. Sets the text content of the multipart body indicated by the PartSelector.

Returns 1 for success, 0 for failure.

SetResponseBodyStream(ByVal expectedStatus As Long, ByVal autoSetStreamCharset As Long, responseStream As ChilkatStream) As Long

Introduced in version 9.5.0.58

Only applies to the Full* methods, such as FullRequestNoBody, FullRequestBinary, FullRequestStream, etc. When set, the response body is streamed directly to responseStream, if (and only if) the HTTP response status code equals expectedStatus.

If the response body was streamed to responseStream, then the string return value of the Full* method instead becomes "OK" for success. If an attempt was made to stream the response body but it failed, then "FAIL" is returned. If the response body was not streamed because the response status code was not equal to expectedStatus, then the returned string contains the server's error response.

If autoSetStreamCharset is 1, then the expectedStatus's StringCharset property will automatically get set based on the charset, if any, indicated in the response header. If the response is binary, then autoSetStreamCharset is ignored.

Returns 1 for success, 0 for failure.

(Classic ASP) Download File from Dropbox

(Visual FoxPro) Download File from Dropbox

(PowerBuilder) Download File from Dropbox

(SQL Server) Download File from Dropbox

(Visual Basic 6.0) Download File from Dropbox

(VBScript) Download File from Dropbox

UseConnection(connection As ChilkatSocket, ByVal autoReconnect As Long) As Long

Introduced in version 9.5.0.58

Sets the connection to be used for sending the REST request. The connection should be an already-connected socket. It may be a TLS connection, an unencrypted connection, through an HTTP proxy, a SOCKS proxy, or even through SSH tunnels. All of the connection related functionality is handled by the Chilkat Socket API.

The autoReconnect indicates whether connection should automatically be established as needed for subsequent REST requests.

Important: The UseConnection method is provided as a means for handling more complicated connections -- such as connections through proxies, tunnels, etc. If your application is connecting directly to the HTTP server, then simply call this class's Connect method.

Returns 1 for success, 0 for failure.

(Classic ASP) Use Socket Object for the Connection

(Visual FoxPro) Use Socket Object for the Connection

(PowerBuilder) Use Socket Object for the Connection

(SQL Server) Use Socket Object for the Connection

(Visual Basic 6.0) Use Socket Object for the Connection

(VBScript) Use Socket Object for the Connection

(Classic ASP) REST through HTTP Proxy

(Visual FoxPro) REST through HTTP Proxy

(PowerBuilder) REST through HTTP Proxy

(SQL Server) REST through HTTP Proxy

(Visual Basic 6.0) REST through HTTP Proxy

(VBScript) REST through HTTP Proxy

(Classic ASP) REST through SOCKS Proxy

(Visual FoxPro) REST through SOCKS Proxy

(PowerBuilder) REST through SOCKS Proxy

(SQL Server) REST through SOCKS Proxy

(Visual Basic 6.0) REST through SOCKS Proxy

(VBScript) REST through SOCKS Proxy

(Classic ASP) REST through SSH Tunnel

(Visual FoxPro) REST through SSH Tunnel

(PowerBuilder) REST through SSH Tunnel

(SQL Server) REST through SSH Tunnel

(Visual Basic 6.0) REST through SSH Tunnel

(VBScript) REST through SSH Tunnel

(Classic ASP) REST Upload Bandwidth Throttle

(Visual FoxPro) REST Upload Bandwidth Throttle

(PowerBuilder) REST Upload Bandwidth Throttle

(SQL Server) REST Upload Bandwidth Throttle

(Visual Basic 6.0) REST Upload Bandwidth Throttle

(VBScript) REST Upload Bandwidth Throttle

Events

AbortCheck(abort As Long)

Provides the opportunity for a method call to be aborted. The AbortCheck event is fired periodically based on the value of the HeartbeatMs property. If HeartbeatMs is 0, then no AbortCheck events will fire. As an example, to fire 5 AbortCheck events per second, set the HeartbeatMs property equal to 200.

VB6 Event callback implementation:

Important: Event callbacks from asynchronous method calls are generally not possible from the ActiveX. See VB6 Async Callbacks

Dim WithEvents myRest As ChilkatRest

Private Sub myRest_AbortCheck(abort As Long)

	'Insert application code here.

End Sub

BinaryData(data As Variant)

Binary data provided by certain methods.

VB6 Event callback implementation:

Important: Event callbacks from asynchronous method calls are generally not possible from the ActiveX. See VB6 Async Callbacks

Dim WithEvents myRest As ChilkatRest

Private Sub myRest_BinaryData(data As Variant)

	'Insert application code here.

End Sub

PercentDone(ByVal pctDone As Long, abort As Long)

Provides the percentage completed for any method that involves network communications or time-consuming processing (assuming it is a method where a percentage completion can be measured). This event is only fired when it is possible to know a percentage completion, and when it makes sense to express the operation as a percentage completed. The pctDone argument will have a value from 1 to 100. For operations (Chilkat method calls) that complete very quickly, the number of PercentDone callbacks will vary, but the final callback should have a value of 100. For long running operations, no more than one callback per percentage point will occur (for example: 1, 2, 3, ... 98, 99, 100).

The PercentDone callback counts as an AbortCheck event. For method calls that complete quickly such that PercentDone events fire, it may be that AbortCheck events don't fire because the opportunity to abort is already provided in the PercentDone callback. For time consuming operations, where the amount of time between PercentDone callbacks are long, AbortCheck callbacks may be used to allow for the operation to be aborted in a more responsive manner.

The abort output argument provides a means for aborting the operation. Setting it to 1 will cause the method to abort and return a failed status (or whatever return value indicates failure).

VB6 Event callback implementation:

Important: Event callbacks from asynchronous method calls are generally not possible from the ActiveX. See VB6 Async Callbacks

Dim WithEvents myRest As ChilkatRest

Private Sub myRest_PercentDone(ByVal pctDone As Long, abort As Long)

	'Insert application code here.

End Sub

ProgressInfo(name As String, value As String)

A general name/value event that provides information about what is happening during a method call. To find out what information is available, write code to handle this event and log the name/value pairs. Most are self-explanatory.

VB6 Event callback implementation:

Important: Event callbacks from asynchronous method calls are generally not possible from the ActiveX. See VB6 Async Callbacks

Dim WithEvents myRest As ChilkatRest

Private Sub myRest_ProgressInfo(name As String, value As String)

	'Insert application code here.

End Sub

TextData(data As String)

Text data provided by certain methods.

VB6 Event callback implementation:

Important: Event callbacks from asynchronous method calls are generally not possible from the ActiveX. See VB6 Async Callbacks

Dim WithEvents myRest As ChilkatRest

Private Sub myRest_TextData(data As String)

	'Insert application code here.

End Sub