GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jamesnvc/http2_client: Prolog HTTP/2 Client. Mirror of https://gitlab.com/jamesnvc/prolog_http2_client

BranchesTags
Open more actions menu

Latest commit

 

History

113 Commits
113 Commits

Folders and files

NameName
Last commit message
Last commit date
prolog
prolog
 
 
test
test
 
 
.gitattributes
.gitattributes
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pack.pl
pack.pl
 
 

Repository files navigation

A Prolog HTTP/2 Client

This library is a work in progress

It currently does not support server push and assumes correct input from servers -- it is not robust in the face of server errors or invalid data being sent.

Only HTTP/2 over TLS is supported, which requires SWI-Prolog 7.7.19 or greater for TLS-ALPN support.

It is available as an SWI pack and can be installed by running ?- pack_install(http2_client).

Contributions extremely welcome

Requires the list_util and delay packs.

Uses the reif library.

Example

:- use_module(library(http2_client)).

test_close_cb(Ctx, Data) :-
    debug(xxx, ">>> server closed ~w", [Data]),
    http2_close(Ctx).
test_cb(Ident, Headers, Body) :-
    debug(xxx, ">>>>> ~w~n>>> headers ~w~n>>>body ~s...", [Ident, Headers, Body]).
test(Ctx) :-
    debug(xxx),
    http2_open('https://nghttp2.org', Ctx, [close_cb(http2_test:test_close_cb(Ctx))]),
    http2_request(Ctx, [':method'-'GET', ':path'-'/httpbin/ip'], [], test_cb(ip)),
    http2_request(Ctx, [':method'-'GET', ':path'-'/httpbin/headers'], [], test_cb(headers)),
    http2_request(Ctx, [':method'-'GET', ':path'-'/httpbin/get'], [], test_cb(get)).

?- test(Ctx).

About

Prolog HTTP/2 Client. Mirror of https://gitlab.com/jamesnvc/prolog_http2_client

Resources

Readme
BSD-3-Clause license
Activity

Stars

7 stars

Watchers

3 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.