Hello,

To make a request,  I chain:
send <http://package.elm-lang.org/packages/evancz/elm-http/3.0.1/Http#send> 
: Settings 
<http://package.elm-lang.org/packages/evancz/elm-http/3.0.1/Http#Settings> 
-> Request 
<http://package.elm-lang.org/packages/evancz/elm-http/3.0.1/Http#Request> -> 
Task RawError 
<http://package.elm-lang.org/packages/evancz/elm-http/3.0.1/Http#RawError> 
Response 
<http://package.elm-lang.org/packages/evancz/elm-http/3.0.1/Http#Response>
and
fromJson 
<http://package.elm-lang.org/packages/evancz/elm-http/3.0.1/Http#fromJson> : 
Decoder a -> Task RawError 
<http://package.elm-lang.org/packages/evancz/elm-http/3.0.1/Http#RawError> 
Response 
<http://package.elm-lang.org/packages/evancz/elm-http/3.0.1/Http#Response> 
-> Task Error 
<http://package.elm-lang.org/packages/evancz/elm-http/3.0.1/Http#Error> a

It works well (thanks to Simon) however I could not retrieve the whole 
response, only the value field of the response. Because the fromJson 
function only: 

   - Check that the status code is in the 200 range.
   - Make sure the response Value is a string.
   - Convert the string to Elm with the given Decoder.

Right?

type alias Response 
<http://package.elm-lang.org/packages/evancz/elm-http/3.0.1/Http#Response> = { 
status : Int , statusText : String , headers : Dict String String , url : 
String , value : Value 
<http://package.elm-lang.org/packages/evancz/elm-http/3.0.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 receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to