Created
July 20, 2018 17:32
-
-
Save lukasz-madon/a8725e5459ac77397ff1d77592d8a22c to your computer and use it in GitHub Desktop.
Send an empty json to an endpoint in Elm. Ignore the response
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sendJson : Cmd Msg | |
sendJson = | |
let | |
json = | |
Http.jsonBody (Json.Encode.object []) | |
in | |
Http.send SendEmptyJsonMsg | |
(Http.post "api/empty-json" json (Json.Decode.succeed "")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment