Explain use of Left value
This commit is contained in:
@@ -122,6 +122,9 @@ userApiRequest schema req reqBody =
|
|||||||
Nothing -> PayloadParseError "All lines must have same number of fields"
|
Nothing -> PayloadParseError "All lines must have same number of fields"
|
||||||
Just json -> PayloadJSON json)
|
Just json -> PayloadJSON json)
|
||||||
(CSV.decodeByName reqBody)
|
(CSV.decodeByName reqBody)
|
||||||
|
-- This is a Left value because form-urlencoded is not a content
|
||||||
|
-- type which we ever use for responses, only something we handle
|
||||||
|
-- just this once for requests
|
||||||
Left "application/x-www-form-urlencoded" ->
|
Left "application/x-www-form-urlencoded" ->
|
||||||
PayloadJSON . UniformObjects . V.singleton . M.fromList
|
PayloadJSON . UniformObjects . V.singleton . M.fromList
|
||||||
. map (cs *** JSON.String . cs) . parseSimpleQuery
|
. map (cs *** JSON.String . cs) . parseSimpleQuery
|
||||||
|
|||||||
Reference in New Issue
Block a user