integration-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Test.Cargohold.API.Util

Synopsis

Documentation

uploadSimple :: (HasCallStack, MakesValue user, MakesValue settings) => user -> settings -> (MIMEType, ByteString) -> App Response Source #

getHeader' :: HeaderName -> Response -> ByteString Source #

Like getHeader, but if no value exists for the given key, return the static ByteString "NO_HEADER_VALUE".

deleteAsset :: (HasCallStack, MakesValue user, MakesValue key) => user -> key -> App Response Source #

class IsAssetToken tok where Source #

Methods

tokenParam :: tok -> Request -> Request Source #

Instances

Instances details
IsAssetToken Value Source # 
Instance details

Defined in Test.Cargohold.API.Util

IsAssetToken String Source # 
Instance details

Defined in Test.Cargohold.API.Util

IsAssetToken () Source # 
Instance details

Defined in Test.Cargohold.API.Util

Methods

tokenParam :: () -> Request -> Request Source #

(IsAssetToken a, IsAssetToken b) => IsAssetToken (Either a b) Source # 
Instance details

Defined in Test.Cargohold.API.Util

Methods

tokenParam :: Either a b -> Request -> Request Source #

IsAssetToken (Request -> Request) Source # 
Instance details

Defined in Test.Cargohold.API.Util

buildMultipartBody :: (HasCallStack, MakesValue header) => header -> ByteString -> MIMEType -> App ByteString Source #

Build a complete multipart/mixed request body for a one-shot, non-resumable asset upload.

beginMultipartBody :: Value -> Type -> Word -> Builder Source #

Begin building a multipart/mixed request body for a non-resumable upload. The returned Builder can be immediately followed by the actual asset bytes.

endMultipartBody' :: Builder Source #

The trailer of a non-resumable multipart/mixed request body initiated via beginMultipartBody.