[go-nuts] Re: Make a multi part request from a stringified body payload

2016-07-11 Thread Mayank Jha
But, I don't want to store it separately. b, _ := ioutil.ReadAll(r.Body) r.Body = ioutil.NopCloser(bytes.NewBuffer(b)) if len(b) > 0 { if err := json.Compact(body, b); err != nil { body = bytes.NewBuffer(b) } } The abov

[go-nuts] Re: Make a multi part request from a stringified body payload

2016-07-10 Thread Aashish Karki
You can store the individual parts separately (along with their type and names) in the db. You can later use https://golang.org/pkg/mime/multipart/#NewWriter to create a multipart request out of the individual parts. On Sunday, July 10, 2016 at 6:13:47 PM UTC-4, Mayank Jha wrote: > > I wish to

[go-nuts] Re: Make a multi part request from a stringified body payload

2016-07-10 Thread Mayank Jha
I wish to store this string payload in a DB, and then construct a multipart request from this, and make one. On Sunday, July 10, 2016 at 6:41:17 PM UTC+5:30, Egon wrote: > > Not quite sure what you mean by reconstructing the request. There is > https://golang.org/pkg/mime/multipart/ for parsing

[go-nuts] Re: Make a multi part request from a stringified body payload

2016-07-10 Thread Egon
Not quite sure what you mean by reconstructing the request. There is https://golang.org/pkg/mime/multipart/ for parsing MIME multipart. On Sunday, 10 July 2016 15:39:00 UTC+3, Mayank Jha wrote: > > Any clues people ? > > On Thursday, July 7, 2016 at 5:05:13 PM UTC+5:30, Mayank Jha wrote: >> >> I

[go-nuts] Re: Make a multi part request from a stringified body payload

2016-07-10 Thread Mayank Jha
Any clues people ? On Thursday, July 7, 2016 at 5:05:13 PM UTC+5:30, Mayank Jha wrote: > > I have the payload, > "--3c1e04950334427b > Content-Disposition: form-data; name="certificate"; filename="new-cert.pem" > Content-Type: application/octet-stream > > -BEGIN RSA PRI