REST 网关:数据格式
REST 网关在 HTTP 请求中使用 Content-Type 头来确定存储到数据网格中的数据的数据格式。
数据格式
REST 网关在 HTTP 请求中使用 Content-Type 头来确定存储到数据网格中的数据的数据格式。 如果插入类型为 application/xml 的内容,那么应用程序对同一高速缓存键执行 GET 操作时,响应主体和 content-type 为等价格式类型。 在此示例中,响应主体将为 application/xml 格式。 可将多个内容类型的数据存储在同一数据网格中。 一些有效内容类型的示例如下:| 内容类型和子类型 | 使用 |
|---|---|
| application/xml | XML |
| application/json | JavaScript 数据 |
| application/octet-stream | 序列化对象,通用数据 |
| application/javascript | JavaScript |
| application/json | JavaScript |
| data application/octet-stream | 已序列化对象, |
| general-purpose data application/pdf | |
| application/soap+xml | 简单对象访问协议 |
| application/xhtml+xml | XHTML |
| application/xml | XML |
| application/xml-dtd | 带有已定义 DTD 的有效 XML 文档 |
| application/zip | ZIP |
| message/http | 通过 HTTP 指向另一消息的消息 |
| text/css | 人类可读 CSS |
| text/csv | 逗号分隔值文本 |
| text/html | 人类可读 HTML |
| text/javascript | 人类可读 JavaScript |
| text/plain | 通用纯文本 |
| text/xml | 人类可读 XML |