From bbd6779cc50096c49c188bdc0c319b8d08601d65 Mon Sep 17 00:00:00 2001 From: Alex Mason Date: Fri, 2 Sep 2016 15:44:49 +1000 Subject: [PATCH] Fix doc formatting and add note about + in URLs --- servant/src/Servant/API/Times.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servant/src/Servant/API/Times.hs b/servant/src/Servant/API/Times.hs index 2f8e508d..76572928 100644 --- a/servant/src/Servant/API/Times.hs +++ b/servant/src/Servant/API/Times.hs @@ -39,8 +39,12 @@ type ISO8601DateTimeZ = "%Y-%m-%dT%H:%M:%S%z" -- as specified in 'Data.Time.Format'. -- -- Example: +-- -- >>> -- GET /events/:date -- >>> type MyApi = "events" :> Capture "date" (FTime "%Y-%m-%d" Day) :> Get '[JSON] [Event] +-- +-- __Note:__ Time Zones parsed in the @%z@ format (@±HHMM@) need to ensure that the @+@ symbol is +-- url encoded (@%2B@) in requests, as the @+@ symbol is interpreted as a space in query params. newtype FTime (format :: Symbol) t = FTime {getFTime :: t} deriving (Typeable, Eq, Ord)