Module
Yoga.Fastify.Route.ParseHeaders
- Package
- purescript-yoga-fastify
- Repository
- rowtype-yoga/purescript-yoga-fastify
#ParseHeaders Source
class ParseHeaders :: Row Type -> Constraintclass ParseHeaders (headers :: Row Type) where
Parse a record of headers from an Object, accumulating all errors
Returns Either (NonEmptyArray HeaderError) (Record headers) to collect all parsing errors
Examples: parseHeaders (Proxy :: Proxy (auth :: String)) obj -- Left (NEA.singleton (MissingHeader "auth")) if missing -- Right { auth: "Bearer token" } if present
Members
parseHeaders :: Proxy headers -> Object String -> Either (NonEmptyArray HeaderError) (Record headers)
Instances
(RowToList headers rl, ParseHeadersRL rl headers) => ParseHeaders headers
#ParseHeadersRL Source
class ParseHeadersRL :: RowList Type -> Row Type -> Constraintclass ParseHeadersRL (rl :: RowList Type) (headers :: Row Type) | rl -> headers where
Helper class using RowList to accumulate errors
Members
parseHeadersRL :: Proxy rl -> Object String -> Either (NonEmptyArray HeaderError) (Record headers)
Instances
ParseHeadersRL Nil ()(IsSymbol name, HeaderValue ty, ParseHeadersRL tail tailRow, Cons name ty tailRow headers, Lacks name tailRow) => ParseHeadersRL (Cons name ty tail) headers
- Modules
- Yoga.
Fastify. Auth. Argon2 - Yoga.
Fastify. Auth. JWT - Yoga.
Fastify. Fastify - Yoga.
Fastify. Plugin - Yoga.
Fastify. Plugin. Cors - Yoga.
Fastify. Plugin. Helmet - Yoga.
Fastify. Plugin. RateLimit - Yoga.
Fastify. Plugin. WebSocket - Yoga.
Fastify. Route. HandleResponse - Yoga.
Fastify. Route. HandleRoute - Yoga.
Fastify. Route. ParseBody - Yoga.
Fastify. Route. ParseHeaders - Yoga.
Fastify. Route. ParsePathParams - Yoga.
Fastify. Route. ParseQueryParams - Yoga.
Fastify. Route. SetHeaders