You can include control and functional parameters in the HTTP message body of an Oracle ATG Web Commerce platform REST Web Services request. The following HTTP request includes two functional parameters and a control parameter in its message body. The content in the message body is specified by the -d
flag in this Curl command. See Curl Command Line Tool in Documentation Examples.
curl -v -c cookies.txt -X POST \ -H "Content-Type: application/xml" \ -d "<parameters><arg1>MyUsername</arg1><arg2>MyPassword</arg2><atg-rest-user-input>MyMessageId</atg-rest-user-input></parameters>" http://servername:8080/rest/bean/atg/userprofiling/ProfileServices/loginUser
The REST Web Services server can interpret message body parameters in one of the following three markup formats. Make sure you set the correct Content-Type
value for the markup that you use. See Setting the Content-Type Value.
XML, see XML Parameter Markup.
JSON, see JSON Parameter Markup.
URL query string, see URL Query String Parameter Markup.
The REST Web Services server will only accept parameters in the message body of a POST or PUT HTTP request. If you need to use the GET or DELETE methods, you need to include data with your request, and you cannot include URL parameters, use the atg-rest-view
and atg-rest-http-method
control parameters. See Handling POST Requests as Other Methods.