}
, 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
>
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
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
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
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
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