REST gateway: Data format
The REST gateway uses the Content-Type header in your HTTP requests to determine the data format of the data stored into the data grid.
Data format
The REST gateway uses the Content-type header in your HTTP requests to determine the data format of the data that is stored in the data grid. If you insert content of type application/xml, when your application does a GET operation for the same cache key, the response body and content-type are in the equivalent format type. In this example, the response body would be in application/xml format. You can store data of multiple content types in the same data grid. Examples of some valid content types follow:| Content type and sub-type | Use |
|---|---|
| application/xml | XML |
| application/json | JavaScript data |
| application/octet-stream | Serialized objects, general-purpose data |
| application/javascript | JavaScript |
| application/json | JavaScript |
| data application/octet-stream | Serialized objects, |
| general-purpose data application/pdf | |
| application/soap+xml | Simple Object Access Protocol |
| application/xhtml+xml | XHTML |
| application/xml | XML |
| application/xml-dtd | Valid XML document with a defined DTD |
| application/zip | ZIP |
| message/http | Message that points to another message via HTTP |
| text/css | Human readable CSS |
| text/csv | Comma-separated values text |
| text/html | Human readable HTML |
| text/javascript | Human readable JavaScript |
| text/plain | Generic plain text |
| text/xml | Human readable XML |