Skip to content

Instantly share code, notes, and snippets.

@lukasz-madon
Created July 20, 2018 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukasz-madon/a8725e5459ac77397ff1d77592d8a22c to your computer and use it in GitHub Desktop.
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
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