メインコンテンツまでスキップ
バージョン:25.2

post XMLRPC

  • command
  • new in 1.53
  • To send an XML-RPC request, the post xmlrpc command is used:
         set myRequest to (methodName:"system.listMethods")
post xmlrpc myRequest to url serverURL

    The message being posted must be a property list with a MethodName property and optionally Params and Header properties:

    MethodName: the method name being called (REQUIRED)

    Params: an array of parameter values. Specify "as boolean", "as text", "as date", etc. when needed to ensure individual values are encoded as the correct type for the method being called.

    Header: a property list of other header elements (optional)

        User-Agent: if not specified in the Header property, the SenseTalk long version will be supplied: SenseTalk Release 1.53

    The URL given in the post command may include a path to identify a particular service on the server. The response from the server will be stored in the variable it.

    • To send an XML-RPC response, use one of the functions XMLRPCResponse() or XMLRPCFault() along with the write command:

         write XMLRPCResponse(responseData) to socket rpcClient
write XMLRPCFault(33, "bad mojo") to socket rpcClient

    The following keys are recognized: (XMLRPCRequest)

    Request: The URI to post to

    Host: The host posted to

    URL: The URL posted to, including host and request URI

    Either the Host or URL is REQUIRED. If Host is given with no Request, the request is set to "/".

    User-Agent: if not specified, the SenseTalk long version will be supplied: SenseTalk Release 1.53

    Header: other header elements (optional)

    Method: the method name being called (REQUIRED)

    Params: an array of parameter values. Specify "as boolean", "as text", etc. when needed.

  • Related: XMLRPCResponse, XMLRPCFault, XMLRPCFormat