Note. For ioutil#NopCloser, as of Go 1.16, this function simply calls 
io.NopCloser. 

On Friday, July 1, 2022 at 1:09:15 PM UTC+8 Ansuraj Khadanga wrote:

> Thats great! Thanks for sharing.
>
> req.Body = ioutil.NopCloser(bytes.NewReader([]byte("foo")))
>
> works!
>
> On Wednesday, 27 June 2018 at 22:21:52 UTC+5:30 keens...@gmail.com wrote:
>
>> This worked perfectly, thanks!
>>
>>
>> On Tuesday, December 1, 2015 at 5:29:27 AM UTC-8, Borja Berastegui wrote:
>>>
>>> req.Body = ioutil.NopCloser(bytes.NewReader([]byte("foo")))
>>>
>>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/50a81a4a-39b7-4d67-ab5e-8ef6fae626c9n%40googlegroups.com.

Reply via email to