Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- uploadSimple :: (HasCallStack, MakesValue user, MakesValue settings) => user -> settings -> (MIMEType, ByteString) -> App Response
- decodeHeaderOrFail :: (HasCallStack, FromByteString a) => HeaderName -> Response -> a
- getHeader' :: HeaderName -> Response -> ByteString
- getHeader :: HeaderName -> Response -> Maybe ByteString
- uploadRaw :: (HasCallStack, MakesValue user) => user -> ByteString -> App Response
- getContentType :: Response -> Maybe Type
- applicationText :: MIMEType
- applicationOctetStream :: MIMEType
- applicationOctetStream' :: Type
- deleteAssetV3 :: (HasCallStack, MakesValue user, MakesValue key) => user -> key -> App Response
- deleteAsset :: (HasCallStack, MakesValue user, MakesValue key) => user -> key -> App Response
- header :: String -> String -> Request -> Request
- class IsAssetToken tok where
- tokenParam :: tok -> Request -> Request
- downloadAssetWithQualifiedAssetKey :: (HasCallStack, IsAssetToken tok, MakesValue key, MakesValue user) => (Request -> Request) -> user -> key -> tok -> App Response
- postToken :: (MakesValue user, HasCallStack) => user -> String -> App Response
- deleteToken :: (MakesValue user, HasCallStack) => user -> String -> App Response
- buildMultipartBody :: (HasCallStack, MakesValue header) => header -> ByteString -> MIMEType -> App ByteString
- multipartBoundary :: String
- buildMultipartBody' :: Value -> Type -> ByteString -> Builder
- beginMultipartBody :: Value -> Type -> Word -> Builder
- endMultipartBody' :: Builder
Documentation
uploadSimple :: (HasCallStack, MakesValue user, MakesValue settings) => user -> settings -> (MIMEType, ByteString) -> App Response Source #
decodeHeaderOrFail :: (HasCallStack, FromByteString a) => HeaderName -> Response -> a Source #
getHeader' :: HeaderName -> Response -> ByteString Source #
Like getHeader
, but if no value exists for the given key, return the
static ByteString "NO_HEADER_VALUE".
getHeader :: HeaderName -> Response -> Maybe ByteString Source #
uploadRaw :: (HasCallStack, MakesValue user) => user -> ByteString -> App Response Source #
deleteAssetV3 :: (HasCallStack, MakesValue user, MakesValue key) => user -> key -> App Response Source #
deleteAsset :: (HasCallStack, MakesValue user, MakesValue key) => user -> key -> App Response Source #
class IsAssetToken tok where Source #
tokenParam :: tok -> Request -> Request Source #
Instances
IsAssetToken Value Source # | |
Defined in Test.Cargohold.API.Util | |
IsAssetToken String Source # | |
Defined in Test.Cargohold.API.Util | |
IsAssetToken () Source # | |
Defined in Test.Cargohold.API.Util tokenParam :: () -> Request -> Request Source # | |
(IsAssetToken a, IsAssetToken b) => IsAssetToken (Either a b) Source # | |
Defined in Test.Cargohold.API.Util | |
IsAssetToken (Request -> Request) Source # | |
Defined in Test.Cargohold.API.Util |
downloadAssetWithQualifiedAssetKey :: (HasCallStack, IsAssetToken tok, MakesValue key, MakesValue user) => (Request -> Request) -> user -> key -> tok -> App Response Source #
postToken :: (MakesValue user, HasCallStack) => user -> String -> App Response Source #
deleteToken :: (MakesValue user, HasCallStack) => user -> String -> App Response Source #
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.
buildMultipartBody' :: Value -> Type -> ByteString -> Builder Source #
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
.