Skip to main content
Version: 8.1

HTTP Bindings in Perspective

Inductive University

HTTP Binding

Watch the video

The HTTP Binding type allows you to use HTTP get/post protocols to interface with other API's.

JSON Support​

One perk of the HTTP binding is the ability to fetch JSON documents from a website or an API. Since the Perspective property tree is also JSON-formatted, this allows you to dynamically create a property structure from a JSON document directly.

HTTP Binding Configuration​

Binding PropertyDescription
URLAn expression indicating what web address to reference on the binding. If entering a static URL, quotation marks must be used.
MethodAny HTTP method. Used to send HTTP requests to the specified URL. See Method.
HeadersUsed to pass key/value pairs in the header of our HTTP requests. See Headers.
BodyAn expression indicating what to send in the body of our HTTP requests.
Authentication TypeIndicates what HTTP authentication type to use. Equivalent to specifying the Authorization key in the header. Options are None, Basic, Bearer, or Digest.
Authentication ValueThe Authentication Value field takes an expression that should indicate what authorization string or token should be used in combination with the associated authentication type. For example, if the header should contain the string:

Authorization: Basic aWduaXRpb246cGFzc3dvcmQ=

Then the Authentication Type should be Basic and the Authentication Value should be aWduaXRpb246cGFzc3dvcmQ=.
Connect TimeoutIndicates how long the Ignition Gateway should wait for a response to our connect request.
Socket TimeoutIndicates how long the Ignition Gateway should wait for a response to a given HTTP request.
EnabledIndicates whether the binding should be active.
Overlay Opt-OutIndicates whether the component should reflect a bad quality binding via a Tag overlay.
Allow CookiesIndicates whether to allow the remote web server to store cookies.
Cache & Share​
New in 8.1.12
When this setting is enabled, the binding will utilize a polling engine that is shared across all running Perspective sessions. The polling engine will poll once, cache the value, and deliver the results to all registered consumers. The cache persists for a period of time that matches the configured poll rate. If polling is off, the default cache duration is 250 milliseconds. This optimization is helpful for consolidating multiple identical polling tasks, particularly when you have many Perspective sessions running at once. Disabling this option will bypass the cache.
PollingControls how frequently HTTP requests should be issued, and therefore how often the binding should be updated.

Method​

MethodDefinition
GETThe GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI.
HEADThe HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
POSTThe POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line.
PUTThe PUT method requests that the enclosed entity be stored under the supplied Request-URI.
DELETEThe DELETE method requests that the origin server delete the resource identified by the Request-URI.
TRACEThe TRACE method is used to invoke a remote, application-layer loop- back of the request message.
CONNECTThe CONNECT method starts two-way communications with the requested resource. It can be used to open a tunnel.

Headers​

FieldDefinition
KeyAllows dropdown selection from common header keys, or the ability to specify a custom one.
ValueThe Value field is an expression.