twilio 1.1.0

Rust bindings for the Twilio API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::{format_xml_string, Action, Method};

pub struct Redirect {
    pub url: String,
    pub method: Method,
}

impl Action for Redirect {
    fn as_twiml(&self) -> String {
        let method_str = match self.method {
            Method::Get => "GET",
            Method::Post => "POST",
        };
        format_xml_string("Redirect", &vec![("method", method_str)], &self.url)
    }
}