All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog JSON library
        • Supporting JSON
          • library(http/http_json): HTTP JSON Plugin module
            • http_client:http_convert_data/4
            • is_json_content_type/1
            • json_type/1
            • post_data_hook/3
            • http_read_json/2
            • http_read_json/3
            • http_read_json_dict/2
            • http_read_json_dict/3
            • reply_json/1
            • reply_json/2
            • reply_json_dict/1
            • reply_json_dict/2
Source[semidet,multifile]http:post_data_hook(+Data, +Out:stream, +HdrExtra)
Hook implementation that allows http_post_data/3 posting JSON objects using one of the forms below.
http_post(URL, json(Term), Reply, Options)
http_post(URL, json(Term, Options), Reply, Options)

If Options are passed, these are handed to json_write/3. In addition, this option is processed:

json_object(As)
If As is dict, json_write_dict/3 is used to write the output. This is default if json(Dict) is passed.
To be done
avoid creation of intermediate data using chunked output.
Source[semidet,multifile]http:post_data_hook(+Term, +Out, +Options)
Hook to extend the datatypes supported by the post(Data) option of http_open/3. The default implementation supports prolog(Term), sending a Prolog term as application/x-prolog.