From b816666f0f2a19cc3162213b7c3f23f065d898cd Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 10 Dec 2019 19:08:08 +0000 Subject: [PATCH] Update documentation (#627) --- sphinx/source/conf.py | 2 ++ sphinx/source/users/client.rst | 20 +++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/sphinx/source/conf.py b/sphinx/source/conf.py index 79b0c52ff..907554be9 100644 --- a/sphinx/source/conf.py +++ b/sphinx/source/conf.py @@ -52,6 +52,8 @@ extensions = [ "sphinx-jsonschema", ] +autosectionlabel_prefix_document = True + # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] diff --git a/sphinx/source/users/client.rst b/sphinx/source/users/client.rst index 7703b9a37..91f2947a9 100644 --- a/sphinx/source/users/client.rst +++ b/sphinx/source/users/client.rst @@ -6,21 +6,31 @@ CCF provides two client implementations (C++ and Python). C++ Client ---------- -.. doxygenclass:: RpcTlsClient +.. doxygenclass:: JsonRpcTlsClient :project: CCF :members: -Alternatively, the ``SigRpcTlsClient`` can be used to issue signed requests (useful for governance). +Alternatively, the ``SigJsonRpcTlsClient`` can be used to issue signed requests (useful for governance). -.. doxygenclass:: SigRpcTlsClient +.. doxygenclass:: SigJsonRpcTlsClient :project: CCF :members: Python Client ------------- -Available as part of CCF Python infra: https://github.com/microsoft/CCF/blob/master/tests/infra/jsonrpc.py. +Available as part of CCF Python infra: https://github.com/microsoft/CCF/blob/master/tests/infra/clients.py. The ``Checker`` class in `ccf.py `_ can be used as a wrapper to wait for requests to be committed. -.. warning:: The Python client does not yet support signed requests. \ No newline at end of file +HTTP +---- + +HTTP support is now available experimentally in CCF. To enable it, follow the standard build procedure, and passing `-DHTTP=ON` to cmake. + +Testcases will automatically switch to using the appropriate clients. +The CCF Python infra client can be used without any modifications other than exporting the ``HTTP`` environment variable. +By default, the Python infra uses `requests `_, but exporting the ``CURL_CLIENT`` environment variable will switch to a ``curl``-based client instead. + +The ``start_test_network.sh`` script documented in :ref:`Quickstart` defaults to using ``curl``. +A simple ``scurl.sh`` wrapper script is automatically generated under ``build/``, and allows sending signed requests to CCF. \ No newline at end of file