Safe Haskell | None |
---|
- data Redirect p
- redirect :: p :/~ Gather' => URL -> End p -> Redirect p
- redirect' :: p :/~ Gather' => RedirectAttributes -> URL -> End p -> Redirect p
- data RedirectAttributes = RedirectAttributes {}
- defaultRedirectAttributes :: RedirectAttributes
- redirectAttributes :: Lens' (Redirect p) RedirectAttributes
- method :: HasMethod t => Lens t t (Maybe Method) Method
<Redirect>
This example
module Example where import Control.Lens import Data.Maybe (fromJust) import Text.XML.Twiml example = respond . (redirect (fromJust $ parseURL "http://pigeons.com/twiml.xml") <&> method .~ POST) $ end
produces the following TwiML response:
<?xml version="1.0" encoding="UTF-8"?> <Response> <Redirect method="POST">http://pigeons.com/twiml.xml</Redirect> </Response>
Constructors
Attributes
data RedirectAttributes Source