Is it necessary to copy fashttp response object or return it directly?
So I have the following code (some part is truncated) is it unnecessary step to copy the fasthttp response first instead of returning the res
object directly? If I directly return it should I put the ReleaseRequest()
outside (inside the calling function)?
Cannot read multipart/form-data body: unexpected EOF. Using fasthttp POST
type FastHttpRestClient struct { client *fasthttp.Client } func (c *FastHttpRestClient) PostForm(request Request) ([]byte, error) { bodyBuffer := &bytes.Buffer{} bodyWriter := multipart.NewWriter(bodyBuffer) req := fasthttp.AcquireRequest() //Header if request.Headers != nil { for k, v := range request.Headers { req.Header.Set(k, v) } } // Add form data fields if request.FormData != nil { err := writeFieldsData(bodyWriter, request.FormData) […]