ActivityPub in OCaml using jsont/eio/requests
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Expose accessor functions for Signing.key and user_agent

Fixes warning 69 (unused-field) by exposing the record fields via
accessor functions in the public interface.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+9
+3
lib/client/apubt.ml
··· 81 81 | Error msg -> raise (E (Signature_error msg)) 82 82 83 83 let key_id t = t.key_id 84 + let key t = t.key 84 85 end 85 86 86 87 type t = { ··· 101 102 in 102 103 let requests = Requests.create ~sw ~default_headers ~timeout:timeout_config env in 103 104 { requests; signing; user_agent } 105 + 106 + let user_agent t = t.user_agent 104 107 105 108 (* Internal: check HTTP response for errors *) 106 109 let check_response resp =
+6
lib/client/apubt.mli
··· 118 118 119 119 val key_id : t -> string 120 120 (** [key_id t] returns the key ID URI. *) 121 + 122 + val key : t -> Requests.Signature.Key.t 123 + (** [key t] returns the signing key. *) 121 124 end 122 125 123 126 val create : ··· 136 139 @param signing HTTP signature configuration for authenticated requests 137 140 @param user_agent User-Agent header (default: "Apubt/0.1") 138 141 @param timeout Request timeout in seconds (default: 30.0) *) 142 + 143 + val user_agent : t -> string 144 + (** [user_agent t] returns the User-Agent string used by the client. *) 139 145 140 146 (** {1 Error Handling} *) 141 147