...
Requests with a JSON body must be sent with a Content-Type
header of application/json
.
Request Headers
As described above, any request that provides a JSON body (typically PUT
or POST
) must include a Content-Type
header. Any request that receives a JSON body (including GET
) must include an Accept
header. If either is omitted when required, SecurityComponent errors will result and the request will be blackholed.
Code Block |
---|
Content-Type: application/json
Accept: application/json |
Character Sets
In general, COmanage supports Unicode, and that includes the REST API. In general, as long as every component of the installation is set up for Unicode (PHP, Apache, the database server) everything should just work. If specifically using a Content-Type
of application/json; charset=utf-8
, it may be necessary to use JSON-style \u####
encoding of non-ASCII characters.
...