Safe Haskell | None |
---|---|
Language | Haskell2010 |
- get :: FromJSON a => Path -> IO a
- getEach :: FromJSON a => Path -> (a -> IO b) -> IO [b]
- getEach_ :: FromJSON a => Path -> (a -> IO b) -> IO ()
- getAll :: FromJSON a => Path -> IO [a]
- post :: (ToJSON a, FromJSON b) => Path -> a -> IO b
- put :: (ToJSON a, FromJSON b) => Path -> a -> IO b
- delete :: Path -> IO ()
- type Path = String
- requestJSON :: FromJSON a => Path -> (Request -> Request) -> IO a
- setMethod :: ByteString -> Request -> Request
- setBody :: ToJSON a => a -> Request -> Request
Documentation
getEach :: FromJSON a => Path -> (a -> IO b) -> IO [b] Source #
Get a paginated resource, giving each item to the given action
Notes:
- This will yield each item out of each page, not each page of items.
- If you're trying to apply a pure function, instead use:
map f <$> getAll path
getEach_ :: FromJSON a => Path -> (a -> IO b) -> IO () Source #
getEach
, but discarding the results of the provided action
getAll :: FromJSON a => Path -> IO [a] Source #
getEach
, but collecting all values into a list that is returned