Did I find the right examples for you? yes no

All Samples(12)  |  Call(12)  |  Derive(0)  |  Import(0)
Redirect call flow to another URL

:param url: specifies the url which Twilio should query to retrieve new
            TwiML. The default is the current url

:param method: specifies the HTTP method to use when retrieving the url

src/t/w/twilio-python-HEAD/tests/test_twiml.py   twilio-python(Download)
    def testRedirectEmpty(self):
        r = Response()
        r.append(twiml.Redirect())
        r = self.strip(r)
        assert_equal(r, '<?xml version="1.0" encoding="UTF-8"?><Response><Redirect /></Response>')
 
    def testRedirectMethod(self):
        r = Response()
        r.append(twiml.Redirect(url="example.com", method="POST"))
    def testRedirectMethodGetParams(self):
        r = Response()
        r.append(twiml.Redirect(url="example.com?id=34&action=hey", method="POST"))
        r = self.strip(r)
        assert_equal(r, '<?xml version="1.0" encoding="UTF-8"?><Response><Redirect method="POST">example.com?id=34&amp;action=hey</Redirect></Response>')
 
    def testAddAttribute(self):
        """add attribute"""
        r = twiml.Redirect("", foo="bar")
    def testBadAppend(self):
        """ should raise exceptions for wrong appending"""
        self.improperAppend(twiml.Redirect())
 
 

src/p/y/python-twilio2-HEAD/tests/test_twiml.py   python-twilio2(Download)
    def testRedirectEmpty(self):
        r = Response()
        r.append(twiml.Redirect())
        r = self.strip(r)
        self.assertEquals(r, '<?xml version="1.0" encoding="utf-8"?><Response><Redirect /></Response>')
 
    def testRedirectMethod(self):
        r = Response()
        r.append(twiml.Redirect(url="example.com", method="POST"))
    def testRedirectMethodGetParams(self):
        r = Response()
        r.append(twiml.Redirect(url="example.com?id=34&action=hey", method="POST"))
        r = self.strip(r)
        self.assertEquals(r, '<?xml version="1.0" encoding="utf-8"?><Response><Redirect method="POST">example.com?id=34&amp;action=hey</Redirect></Response>')
 
    def testAddAttribute(self):
        """add attribute"""
        r = twiml.Redirect("",foo="bar")
    def testBadAppend(self):
        """ should raise exceptions for wrong appending"""
        self.improperAppend(twiml.Redirect())