graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.Eventing.HTTP

Description

Hasura.Eventing.HTTP

This module is an utility module providing HTTP utilities for Hasura.Eventing.EventTriggers and Hasura.Eventing.ScheduledTriggers.

The event triggers and scheduled triggers share the event delivery mechanism using the tryWebhook function defined in this module.

Synopsis

Documentation

data HTTPResp (a :: TriggerTypes) Source #

Constructors

HTTPResp 

Instances

Instances details
Show (HTTPResp a) Source # 
Instance details

Defined in Hasura.Eventing.HTTP

Methods

showsPrec :: Int -> HTTPResp a -> ShowS #

show :: HTTPResp a -> String #

showList :: [HTTPResp a] -> ShowS #

ToJSON (HTTPResp a) Source # 
Instance details

Defined in Hasura.Eventing.HTTP

Methods

toJSON :: HTTPResp a -> Value

toEncoding :: HTTPResp a -> Encoding

toJSONList :: [HTTPResp a] -> Value

toEncodingList :: [HTTPResp a] -> Encoding

ToEngineLog (HTTPResp 'EventType) Hasura Source # 
Instance details

Defined in Hasura.Eventing.HTTP

ToEngineLog (HTTPResp 'ScheduledType) Hasura Source # 
Instance details

Defined in Hasura.Eventing.HTTP

data HTTPErr (a :: TriggerTypes) Source #

Instances

Instances details
Show (HTTPErr a) Source # 
Instance details

Defined in Hasura.Eventing.HTTP

Methods

showsPrec :: Int -> HTTPErr a -> ShowS #

show :: HTTPErr a -> String #

showList :: [HTTPErr a] -> ShowS #

ToJSON (HTTPErr a) Source # 
Instance details

Defined in Hasura.Eventing.HTTP

Methods

toJSON :: HTTPErr a -> Value

toEncoding :: HTTPErr a -> Encoding

toJSONList :: [HTTPErr a] -> Value

toEncodingList :: [HTTPErr a] -> Encoding

ToEngineLog (HTTPErr 'EventType) Hasura Source # 
Instance details

Defined in Hasura.Eventing.HTTP

ToEngineLog (HTTPErr 'ScheduledType) Hasura Source # 
Instance details

Defined in Hasura.Eventing.HTTP

data HTTPReq Source #

Constructors

HTTPReq 

Fields

runHTTP :: MonadIO m => Manager -> Request -> m (Either (HTTPErr a) (HTTPResp a)) Source #

mkRequest Source #

Arguments

:: MonadError (TransformableRequestError a) m 
=> [Header] 
-> ResponseTimeout 
-> ByteString

the request body. It is passed as a Bytestring because we need to log the request size. As the logging happens outside the function, we pass it the final request body, instead of Value

-> Maybe RequestTransform 
-> ResolvedWebhook 
-> m RequestDetails 

prepareHeaders :: [EventHeaderInfo] -> ([Header], [HeaderConf]) Source #

Encodes given request headers along with our defaultHeaders and returns them along with the re-decoded set of headers (for logging purposes).