truelayer-0.1.3.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Bank.TrueLayer.Internal

Synopsis

Documentation

getWithAuth :: FromJSON a => String -> Endpoint -> AccessToken -> IO (Maybe a) Source #

postWithAuth :: (ToJSON body, FromJSON res) => String -> body -> Endpoint -> AccessToken -> IO (Maybe res) Source #

header :: HeaderName -> Lens' Options [ByteString] #

param :: Text -> Lens' Options [Text] #

(.~) :: ASetter s t a b -> b -> s -> t #

(&) :: a -> (a -> b) -> b infixl 1 #

& is a reverse application operator. This provides notational convenience. Its precedence is one higher than that of the forward application operator $, which allows & to be nested in $.

>>> 5 & (+1) & show
"6"

Since: base-4.8.0.0

(</>) :: FilePath -> FilePath -> FilePath infixr 5 #

Combine two paths with a path separator. If the second path starts with a path separator or a drive letter, then it returns the second. The intention is that readFile (dir </> file) will access the same file as setCurrentDirectory dir; readFile file.

Posix:   "/directory" </> "file.ext" == "/directory/file.ext"
Windows: "/directory" </> "file.ext" == "/directory\\file.ext"
         "directory" </> "/file.ext" == "/file.ext"
Valid x => (takeDirectory x </> takeFileName x) `equalFilePath` x

Combined:

Posix:   "/" </> "test" == "/test"
Posix:   "home" </> "bob" == "home/bob"
Posix:   "x:" </> "foo" == "x:/foo"
Windows: "C:\\foo" </> "bar" == "C:\\foo\\bar"
Windows: "home" </> "bob" == "home\\bob"

Not combined:

Posix:   "home" </> "/bob" == "/bob"
Windows: "home" </> "C:\\bob" == "C:\\bob"

Not combined (tricky):

On Windows, if a filepath starts with a single slash, it is relative to the root of the current drive. In [1], this is (confusingly) referred to as an absolute path. The current behavior of </> is to never combine these forms.

Windows: "home" </> "/bob" == "/bob"
Windows: "home" </> "\\bob" == "\\bob"
Windows: "C:\\home" </> "\\bob" == "\\bob"

On Windows, from [1]: "If a file name begins with only a disk designator but not the backslash after the colon, it is interpreted as a relative path to the current directory on the drive with the specified letter." The current behavior of </> is to never combine these forms.

Windows: "D:\\foo" </> "C:bar" == "C:bar"
Windows: "C:\\foo" </> "C:bar" == "C:bar"

data Options #

Instances

Instances details
Show Options 
Instance details

Defined in Network.Wreq.Internal.Types

newtype Endpoint Source #

Constructors

Endpoint String 

newtype AccessToken #

Constructors

AccessToken 

Fields

Instances

Instances details
FromJSON AccessToken 
Instance details

Defined in Network.OAuth.OAuth2.Internal

Methods

parseJSON :: Value -> Parser AccessToken

parseJSONList :: Value -> Parser [AccessToken]

ToJSON AccessToken 
Instance details

Defined in Network.OAuth.OAuth2.Internal

Methods

toJSON :: AccessToken -> Value

toEncoding :: AccessToken -> Encoding

toJSONList :: [AccessToken] -> Value

toEncodingList :: [AccessToken] -> Encoding

Show AccessToken 
Instance details

Defined in Network.OAuth.OAuth2.Internal

Binary AccessToken 
Instance details

Defined in Network.OAuth.OAuth2.Internal

Eq AccessToken 
Instance details

Defined in Network.OAuth.OAuth2.Internal