Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "web"

Title:Easy web client
Rating:Not rated. Create the first rating!
Latest version:0.1.1
SHA1 sum:506cdcc9dff1e4b611fce7b89d07ea59720c8f60
Author:Michael Hendricks <michael@ndrix.org>
Maintainer:Michael Hendricks <michael@ndrix.org>
Packager:Michael Hendricks <michael@ndrix.org>
Home page:https://github.com/mndrix/web
Download URL:https://github.com/mndrix/web/archive/v0.1.1.zip

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
0.1.12fe7037628ae5f948e9ee325ffb7c0e752e248ab3https://github.com/mndrix/web/archive/v0.1.1.zip
506cdcc9dff1e4b611fce7b89d07ea59720c8f6042https://github.com/mndrix/web/archive/v0.1.1.zip

Synopsis

:- use_module(library(web), []).

?- web:get('http://www.ndrix.com/hello.txt', codes(Text)).
Text = `Hello from the Internet`.

?- web:get('http://httpbin.org/ip', json(Dict)).
Dict = _{origin: "66.119.58.231"}.

Description

This module helps you perform HTTP operations with as little code as possible. This includes:

  • basic HTTP requests
  • helpful SSL defaults
  • convert HTTP responses from common data formats
    • JSON
    • HTML5

For more complex needs, use http_open or http_client directly.

Installation

Using SWI-Prolog 7.1 or later:

?- pack_install(web).

This module uses semantic versioning.

Source code available and pull requests accepted at http://github.com/mndrix/web

Contents of pack "web"

Pack contains 10 files holding a total of 252K bytes.