Set the Content-Type value when you send an HTTP message with parameters in its message body. The Oracle ATG Web Commerce platform REST Web Services server uses this value to determine how to interpret the parameters. If you do not include the Content-Type or include a value that doesn’t match the markup of your parameters, the server will ignore the message body.

Use one of the following Content-Type values to specify the markup of the parameters in a message body.

The following example shows an HTTP request that sets its Content-Type to application/xml.

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

* About to connect() to servername port 8080 (#0)
*   Trying 12.34.567.890... connected
* Connected to servername (12.34.567.890) port 8080 (#0)
> POST /rest/bean/atg/userprofiling/ProfileServices/loginUser HTTP/1.1
> User-Agent: curl/7.21.1 (i386-pc-win32) libcurl/7.21.1 zlib/1.2.5
> Host: servername:8080
> Accept: */*
> Content-Type: application/xml
> Content-Length: 125