Availability:
:- use_module(library(http/http_json)).
- content_type(+Type)
- The default
Content-type
isapplication/json; charset=UTF8
.charset=UTF8
should not be required because JSON is defined to be UTF-8 encoded, but some clients insist on it. - status(+Code)
- The default status is 200. REST API functions may use other values from the 2XX range, such as 201 (created).
- json_object(+As)
- One of
term
(classical json representation) ordict
to use the new dict representation. If omitted and Term is a dict,dict
is assumed. SWI-Prolog Version 7.