Awesome! I was just looking for the same answer!

Thanks a lot guys.


Le jeudi 12 avril 2012 16:08:52 UTC+2, Douglas Fils a écrit :
>
> Peter,
>   Thanks!   works perfectly..     I'll check out newReader too.   
> Appreciate the help!
>
> Take care
> Doug
>
>
> On Thursday, April 12, 2012 8:54:56 AM UTC-5, Peter Thrun wrote:
>>
>> The response body is an io.Reader.  Use the body directly instead of 
>> slurping it up into a byte slice.  
>>
>> res, err = http.Get("URL HERE")
>> if err != nil || res.StatusCode != 200 {
>>     // handle errors
>> }
>> defer res.Body.Close()
>> m, _, err := image.Decode(res.Body)
>> if err != nil {
>>    // handle error
>> }
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to