Files
code_of_conquest_dnd/client/scripts/net/dm_transport.gd

11 lines
516 B
GDScript

class_name DmTransport
extends RefCounted
## The network seam. DmService talks to this, never to HTTPRequest directly, so
## the loop logic is testable with an injected fake. Concrete transports
## override post_json. The base returns a failed response (rather than assert())
## so a missing override is a loud, catchable failure in tests.
func post_json(_path: String, _body: Dictionary) -> DmResponse:
push_error("DmTransport.post_json must be overridden")
return DmResponse.failed("transport not implemented")