Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions client-haskell/src/Icepeak/Client.hs
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,12 @@ deleteAtLeafRequest = deleteAtLeafRequestWithOptions defaultRequestOptions
-- | Return a HTTP request for setting a value at the leaf of a path.
setAtLeafRequestWithOptions :: ToJSON a => RequestOptions -> Config -> [Text] -> a -> HTTP.Request
setAtLeafRequestWithOptions options config path leaf =
(baseRequest config)
{ HTTP.method = "PUT"
, HTTP.path = requestPathForIcepeakPath path (optionsToQuery options)
, HTTP.requestBody = HTTP.RequestBodyLBS (Aeson.encode leaf)
}
let req = (baseRequest config)
in req { HTTP.method = "PUT"
, HTTP.path = requestPathForIcepeakPath path (optionsToQuery options)
, HTTP.requestBody = HTTP.RequestBodyLBS (Aeson.encode leaf)
, HTTP.requestHeaders = ("Content-Type", "application/json"):(HTTP.requestHeaders req)
}

-- | Return a HTTP request for deleting a value at the leaf of a path.
deleteAtLeafRequestWithOptions :: RequestOptions -> Config -> [Text] -> HTTP.Request
Expand Down