Function request_endpoint_stream

Source
pub async fn request_endpoint_stream<'a, T>(
    json: &'a T,
    endpoint: &'a Endpoint,
    variant: EndpointVariant,
    cb: impl FnMut(Result<String, Box<dyn Error>>),
) -> Result<(), Box<dyn Error>>
where T: Serialize,
Expand description

Send request to remote endpoint using JSON but response will be streamed.

ยงArguments

  • json - the serialized contents to send
  • endpoint - Endpoint enum variant
  • variant - Endpoint variant enum
  • cb - callback function that will be called when message received. Note the differences of the function parameters.