Global Endpoint type definition
Bindings defined for the REST Web service can be changed at runtime.
The global endpoint type is generated when the fglrestful tool generates the stub file.
At runtime you can use endpoint to change the client behavior, such as the Web server address the client is bound to, or to change other bindings exposed on the Web service.
REST global Endpoint type
TYPE tGlobalEndpointType RECORD # REST Endpoint
Address RECORD
Uri STRING
END RECORD,
Binding RECORD
Version STRING, # HTTP Version (1.0 or 1.1)
ConnectionTimeout INTEGER,
ReadWriteTimeout INTEGER,
CompressRequest STRING
END RECORD
END RECORD
Description of variables:
-
Address.Uri
: Represents the location of the server. -
Binding.Version
: Represents the HTTP version to use for communication (only 1.0 or 1.1 allowed, default is 1.1). -
Binding.ConnectionTimeout
: Represents the maximum time in seconds to wait for the establishment of the connection to the server. -
Binding.ReadWriteTimeout
: Represents the maximum time in seconds to wait for a connection read or write operation before breaking the connection. -
Binding.CompressRequest
: Represents the compression option specified in the header Content-Encoding, gzip or deflate.
Public endpoint variable
In the stub file, an Endpoint
variable of type
tGlobalEndpointType
is defined as public. The address of the Web service is set
when the stub is generated by the Genero Web Services engine.
PUBLIC DEFINE Endpoint
tGlobalEndpointType
= (Address: (Uri: "http://localhost:8090/MyService"))