pub async fn request_endpoint<'a, T, F>(
json: &'a T,
endpoint: &'a Endpoint,
variant: EndpointVariant,
cb: F,
) -> Result<(), Box<dyn Error>>
Expand description
Send request to remote endpoint using JSON.
ยงArguments
json
- the serialized contents to sendendpoint
- Endpoint enum variantvariant
- Endpoint variant enumcb
- callback function that will be called when message received.