Skip to content

Commit

Permalink
v 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Zocca committed Aug 6, 2023
1 parent 40d0bed commit 23da10b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ms-azure-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ ToJSON instance of Location renders the full name e.g. "West Europe"

MSAzureAPI.ServiceBus

add 'http-client' as an explicit dependency

* breaking changes

Fixed definition of 'put' to use the correct HTTP verb
Add constructor to 'APIPlane' to reflect service bus usage

## 0.4

TLS support
Expand Down
7 changes: 6 additions & 1 deletion ms-azure-api/src/MSAzureAPI/ServiceBus.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{-# LANGUAGE TypeFamilies #-}
module MSAzureAPI.ServiceBus where

import GHC.Exts (IsList(..))
import GHC.Generics (Generic(..))

-- aeson
Expand Down Expand Up @@ -37,8 +39,11 @@ sendMessageBatch sn qname topic = postSBMessage sn [
where
qpt = qname <> "|" <> topic


newtype MessageBatch a = MessageBatch [a] deriving (Eq, Show)
instance IsList (MessageBatch a) where
type Item (MessageBatch a) = a
fromList = MessageBatch
toList (MessageBatch xs) = xs
instance A.ToJSON a => A.ToJSON (MessageBatch a) where
toJSON (MessageBatch xs) = A.toJSON $ map (\x -> M.singleton ("Body" :: String) x) xs

Expand Down

0 comments on commit 23da10b

Please sign in to comment.