On a related note, I found duplicate headers (Elm > 0.18?) may also cause a 
415 error. 
It has also been fixed - https://github.com/mattjbray/servant-elm/issues/19

On Saturday, 2 July 2016 03:51:58 UTC+5:30, Dirk Vaneynde wrote:
>
> Hi, I try to post some json via ELM to a java server with jax-rs, 
> consuming application/json.
>
> It works fine using curl: 
>
> curl -vH "Content-Type: application/json" -X POST -d '{"robotOn": true}' 
> http://localhost:8080/domo/screenRobotUpdate
>
> But it returns 415 error code when using the following simple elm code:
>
> updateInfo: Model -> Task Http.Error String
> updateInfo model =
>   *Http.post Json.Decode.string urlPost (Http.string """{"robotOn": 
> false}""")*
>
> I'm already in a bad mood since Belgium lost to Wales, so help is 
> appreciated :)
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to