The <Redirect> verb transfers control to a different URL.
The "Noun" of a Twilio verb is the body of the element, the thing the verb
acts upon. In the case of <Redirect>, the noun is an absolute or
relative URL to a different URL.
The <Redirect> verb does not submit any information.
| Attribute Name | Allowed Values | Default Value |
|---|---|---|
| method | GET,POST | POST |
The method attribute takes the value GET or POST. This tells Twilio
whether to <Redirect> using an HTTP GET or POST. POST is the default.
The <Redirect> verb can be nested in the following elements
The following verbs can be nested within <Redirect>
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>415-123-4567</Dial>
<Redirect>
http://www.foo.com/nextInstructions
</Redirect>
</Response>
In this example, we have a <Redirect> verb after a <Dial>
verb with no URL. When the <Dial> verb finishes, the
<Redirect> executes. <Redirect> makes a request to http://www.foo.com/nextInstructions and
transfers control to a different URL.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Redirect>
../nextInstructions
</Redirect>
</Response>
Redirects flow control to a the specified URL relative to the current URL.