2.2 library(http/http_client): HTTP client library
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog HTTP support
        • The HTTP client libraries
          • library(http/http_client): HTTP client library
            • http_get/3
            • http_delete/3
            • http_post/4
            • http_put/4
            • http_patch/4
            • http_read_data/3
            • http_convert_data/4
            • http_disconnect/1
            • post_data_hook/3
Availability::- use_module(library(http/http_client)).
Source[det]http_get(+URL, -Data, +Options)
Get data from a URL server and convert it to a suitable Prolog representation based on the Content-Type header and plugins. This predicate is the common implementation of the HTTP client operations. The predicates http_delete/3, http_post/4 and http_put/4 call this predicate with an appropriate method(+Method) option and ---for http_post/4 and http_put/4--- a post(+Data) option.

Options are passed to http_open/3 and http_read_data/3. Other options:

reply_header(-Fields)
Synonym for headers(Fields) from http_open/3. Provided for backward compatibility. Note that http_version(Major-Minor) is missing in the new version.