RESTfm flags and parameters

RESTfm accepts flags and parameters to modify it's input parsing, data processing, and output behaviour.

RESTfm flags and parameters are identified by the prefix 'RFM', and may be supplied in three different locations in this descending order of priority:

  1. As URI query string parameters.
  2. As application/x-www-form-urlencoded or multipart/form-data parameters (only applicable to the HTPT POST method).
  3. As parameters inside the 'info' section of a formatted message (e.g.  JSON, XML, etc.)

The only distinction between RESTfm flags and parameters is that flags have no argument (value). It is ok to assign a value to flags if desired, a good choice would be the number one '1'.

Example message, URI and response:

By utilising the echo service URI, the priority of RFM parameters may be demonstrated.

    "info": {
        "RFMparam1": "infoSection",
        "RFMparam2": "infoSection",
        "RFMparam3": "infoSection"
    "data": [
            "Pcode": "9998",
            "Locality": "A New Location 1"
            "Pcode": "9999",
            "Locality": "A New Location 2"
Example JSON RFM parameters priority message.
The above JSON is then URL encoded and passed as the RFMdata parameter in the encoding below.

Note: It is not a requirement to use this double encoding scheme to POST JSON data, it is just used here as a contrived example to demonstrate the three possible locations for RESTfm parameters and their priorities.

Example embedded JSON RFM parameters priority message.
The final POST URI also contains RESTfm parameters. The response demonstrates the priority of the parameters as determined by RESTfm. 
        RESTfm 3.0.0beta/r420 Echo Service
------------ Parameters -------------
------------ Data -------------------
    Locality="A New Location 1"
    Locality="A New Location 2"
------------ RESTfm -----------------
request method=POST
response format=json
Example embedded JSON RFM parameters priority response.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us