fmgp.did.framework.TransportDIDCommOverHTTP
See theTransportDIDCommOverHTTP companion object
class TransportDIDCommOverHTTP(destination: String, inboundBuf: Hub[SignedMessage | EncryptedMessage]) extends TransportDIDComm[Client & Scope]
Client-side HTTP transport for DIDComm messaging.
Implements the Transport abstraction over HTTP. Outbound and inbound are independent, unrelated message flows — they are NOT coupled as HTTP request-response pairs.
==Features==
- R1 — Outbound delivery: POST the DIDComm message as JSON to
destinationwith the correct Content-Type header (application/didcomm-signed+json or application/didcomm-encrypted+json). - R2 — Inbound via Hub (broadcast):
inboundsupports multiple concurrent subscribers (pub-sub / broadcast semantics via Hub). Every subscriber receives every message published after their subscription. - R3 — No late subscriber guarantee: Hub does not replay past messages. Subscribers that connect after a message was published will not receive it. This is by design.
- R4 — HTTP response parsing: After each outbound POST, the HTTP response body is parsed. If it contains a valid DIDComm message (SignedMessage or EncryptedMessage), it is published to the inbound Hub. If the body is empty, not valid JSON, or not a DIDComm message, it is logged and ignored.
- R5 — TransportID: Uses
TransportID.http. - R6 — Error handling: HTTP errors (non-2xx status) are logged but not delivered to
inbound. Network/connection failures are logged and the effect dies (orDie). - R7 — SingleTransmission semantics: TransmissionType is SingleTransmission, unlike WebSocket's MultiTransmissions.
- R8 — Environment: Requires
Client & Scopefrom zio-http. The companion object providesmakeWithEnvironmentto pre-inject the environment and return aTransportDIDComm[Any].
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article