ServiceRequest[service,"req"]

represents a service request built from service, which might be a connected ServiceObject or a valid service name, and request "req".

ServiceRequest[service,"req",param]

represents a service request, built from the service service, request "req" and parameters param.

ServiceRequest[assoc]

represents a service request, built from association assoc.

Details

  • ServiceRequest gives a symbolic representation of a service request; it does not execute the request.
  • The following entries must be given in the association:
  • "Request"request to be made
    "Parameters"parameters for the request
    "Service"name of the service or service object
  • ServiceRequest[]["prop"] extracts the value for the property "prop" of the service request.
  • Possible properties include all components and additional elements, as well as:
  • "Service"external service
    "Request"request name
    "Parameters"request parameters
    "Properties"list of all possible properties
    "PropertyAssociation"association giving values of all properties

Examples

Basic Examples  (3)

Create a request for "PubChem" service:

List requests supported by the "PubChem" service:

Open a connection to an external service:

Create a request:

Get properties:

Extract properties from the request:

Get request data as "PropertyAssociation":

Execute the request:

Submit the request and set result:

Build a request with an association:

Execute the request:

Introduced in 2019
 (12.0)