Re: [elm-discuss] http request: How to access the whole response

2016-06-24 Thread germain
} , Cmd.none ) PostFail errorMessage -> ( { model | error = (toString errorMessage) }, Cmd.none) Le mercredi 22 juin 2016 00:33:05 UTC+8, William Casarin a écrit : > > Hey germain, > > On Mon, Jun 20, 2016 at 11:23 PM, germain <germai...@gmail.com >

Re: [elm-discuss] http request: How to access the whole response

2016-06-21 Thread germain
IT'S WORK, thank you so much William ~ BUT I HAVE A FEW MORE QUESTIONS: - Http.fromJson decoder (Task.succeed response) => why do you use (Task.succeed response) ? And not just give as argument "response"? Is it connected with `andThen` and its signature andThen

Re: [elm-discuss] http request: How to access the whole response

2016-06-16 Thread germain
ing response) }, Cmd.none ) PostFail errorMessage -> ( { model | error = (toString errorMessage) }, Cmd.none) And then I got the same result, the value of the Http.Response only : UnexpectedPayload "Expecting an object with a field named `seatNo` but instead got: {\"dat

Re: [elm-discuss] http request: How to access the whole response

2016-06-16 Thread germain
post' : String -> Http.Body -> Task.Task RawError Http.Responsepost' url body =Http.send Http.defaultSettings{ verb = "POST", headers =[ ("Content-type", "application/json")], url = url, body = body} promoteError : RawError -> ErrorpromoteError rawError = case rawError

[elm-discuss] http request: How to access the whole response

2016-06-15 Thread germain
1/Http#Value> } Is it possible to retrieve the whole response, for example to retrieve the status and the value fields? Thanks, Germain. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiv

[elm-discuss] one message calls two messages

2016-05-26 Thread germain
stCounter, IncrementSecondCounter ]) IncrementFirstCounter -> ( { model | countFirst = model.countFirst + 1 }, Cmd.none) IncrementSecondCounter -> ( { model | countSecond = model.countSecond + 1 }, Cmd.none) Tks, Germain. -- You received this message because you are subscribe