diff --git a/src/lib_client_base/client_context.ml b/src/lib_client_base/client_context.ml index 8fb20807c..3ef32fa9c 100644 --- a/src/lib_client_base/client_context.ml +++ b/src/lib_client_base/client_context.ml @@ -78,6 +78,7 @@ class type full = object end class proxy_context (obj : full) = object + method base = obj#base method block = obj#block method answer : type a. (a, unit) lwt_format -> a = obj#answer method call_service : diff --git a/src/lib_rpc/RPC_context.ml b/src/lib_rpc/RPC_context.ml index 066356439..1b469fa98 100644 --- a/src/lib_rpc/RPC_context.ml +++ b/src/lib_rpc/RPC_context.ml @@ -59,6 +59,7 @@ class type json = object Uri.t -> (Data_encoding.json, Data_encoding.json option) rest_result Lwt.t + method base : Uri.t end diff --git a/src/lib_rpc/RPC_context.mli b/src/lib_rpc/RPC_context.mli index 561955993..3a49f7b9d 100644 --- a/src/lib_rpc/RPC_context.mli +++ b/src/lib_rpc/RPC_context.mli @@ -59,6 +59,7 @@ class type json = object Uri.t -> (Data_encoding.json, Data_encoding.json option) rest_result Lwt.t + method base : Uri.t end class ['pr] of_directory : 'pr RPC_directory.t -> ['pr] gen diff --git a/src/lib_rpc_http/RPC_client.ml b/src/lib_rpc_http/RPC_client.ml index a446e1327..1ce7f6133 100644 --- a/src/lib_rpc_http/RPC_client.ml +++ b/src/lib_rpc_http/RPC_client.ml @@ -437,4 +437,5 @@ class http_ctxt config media_types : RPC_context.json = fun service ~on_chunk ~on_close params query body -> call_streamed_service media_types service ~logger ~base ~on_chunk ~on_close params query body + method base = base end diff --git a/src/proto_alpha/lib_client/proto_alpha.ml b/src/proto_alpha/lib_client/proto_alpha.ml index 443a02ab9..74e960d62 100644 --- a/src/proto_alpha/lib_client/proto_alpha.ml +++ b/src/proto_alpha/lib_client/proto_alpha.ml @@ -17,6 +17,7 @@ class type rpc_context = object end class wrap_proto_context (t : RPC_context.json) : rpc_context = object + method base : Uri.t = t#base method generic_json_call = t#generic_json_call method call_service : 'm 'p 'q 'i 'o. ([< Resto.meth ] as 'm, unit, 'p, 'q, 'i, 'o) RPC_service.t ->