async fn send_message(
    http_client: &Arc<dyn HttpClient>,
    namespace: &str,
    queue: &str,
    policy_name: &str,
    signing_key: &hmac::Key,
    msg: &str,
) -> Result<(), Error> {
    let url = format!(
        "https://{}.servicebus.windows.net/{}/messages",
        namespace, queue
    );

    let req = prepare_request(
        &url,
        Method::POST,
        Some(msg.to_string()),
        policy_name,
        signing_key,
    )?;

    http_client
        .execute_request_check_status(req, http::StatusCode::CREATED)
        .await?;
    Ok(())
}
/// Sends a message to the queue
Sends a message to the queue
Sends a message to the queue
async fn send_message(
    http_client: &Arc<dyn HttpClient>,
    namespace: &str,
    queue: &str,
    policy_name: &str,
    signing_key: &hmac::Key,
    msg: &str,
) -> Result<(), Error> {
    let url = format!(
        "https://{}.servicebus.windows.net/{}/messages",
        namespace, queue
    );
    let req = prepare_request(
        &url,
        Method::POST,
        Some(msg.to_string()),
        policy_name,
        signing_key,
    )?;
    http_client
        .execute_request_check_status(req, http::StatusCode::CREATED)
        .await?;
    Ok(())
}
async fn send_message ( http_client : & Arc < dyn HttpClient > , namespace : & str , queue : & str , policy_name : & str , signing_key : & hmac :: Key , msg : & str , ) -> Result < ( ) , Error > { let url = format ! ( " " namespace queue ) ; let req = prepare_request ( & url , Method :: POST , Some ( msg . to_string ( ) ) , policy_name , signing_key , ) ? ; http_client . execute_request_check_status ( req , http :: StatusCode :: CREATED ) . await ? ; Ok ( ( ) ) }
Sends a message to the queue
Sends a message to the queue
http_client
&Arc<dyn HttpClient>
namespace
&str
queue
&str
policy_name
&str
signing_key
&hmac::Key
msg
&str