uhttpmock
=========

uhttpmock is a project for mocking web service APIs which use HTTP or HTTPS. It
provides a library, libuhttpmock, which implements recording and playback of
HTTP request–response traces.

See the test programs in libuhttpmock/tests/ for simple examples of how to use
the code.

libuhttpmock’s API is currently unstable and is likely to change wildly.

Using uhttpmock
===============

Key points:
 1. All requests must be HTTPS or all requests must be HTTP. uhttpmock can’t
    handle a mixture of HTTPS and HTTP requests.
 2. You must override your code to use the port returned by
    uhm_server_get_port(), rather than the default HTTP or HTTPS ports.
 3. You must disable libsoup’s SSL strict mode (SOUP_SESSION_SSL_STRICT)
    because uhttpmock uses self-signed SSL certificates.
 4. You must output all libsoup log data to uhttpmock.

Dependencies
============

 • glib-2.0 ≥ 2.38.0
 • gio-2.0 ≥ 2.36.0
 • libsoup-2.4 ≥ 2.47.3

Deprecation guards
==================

If LIBUHTTPMOCK_DISABLE_DEPRECATED is defined when compiling against
libuhttpmock, all deprecated API will be removed from included headers.

Licensing
=========

libuhttpmock is licensed under the LGPL; see COPYING.LIB for more details.

Bugs
====

Bug reports and merge requests should be submitted on GitLab:
 • https://gitlab.freedesktop.org/pwithnall/uhttpmock/issues/new
 • https://gitlab.freedesktop.org/pwithnall/uhttpmock/merge_requests/new

Contact
=======

Philip Withnall <philip@tecnocode.co.uk>
https://gitlab.freedesktop.org/pwithnall/uhttpmock
